@stylable/module-utils
Advanced tools
Comparing version 2.0.10 to 2.1.0
@@ -7,4 +7,5 @@ import { StylableConfig } from '@stylable/core'; | ||
renderableOnly: boolean; | ||
legacyRuntime: boolean; | ||
} | ||
export declare function stylableModuleFactory(stylableOptions: StylableConfig, { runtimePath, runtimeStylesheetId, injectCSS, renderableOnly }?: Partial<Options>): (source: string, path: string) => string; | ||
export declare function stylableModuleFactory(stylableOptions: StylableConfig, { runtimePath, runtimeStylesheetId, injectCSS, renderableOnly, legacyRuntime }?: Partial<Options>): (source: string, path: string) => string; | ||
//# sourceMappingURL=module-factory.d.ts.map |
@@ -6,4 +6,7 @@ "use strict"; | ||
function stylableModuleFactory(stylableOptions, _a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.runtimePath, runtimePath = _c === void 0 ? '@stylable/runtime' : _c, _d = _b.runtimeStylesheetId, runtimeStylesheetId = _d === void 0 ? 'module' : _d, _e = _b.injectCSS, injectCSS = _e === void 0 ? true : _e, _f = _b.renderableOnly, renderableOnly = _f === void 0 ? false : _f; | ||
var _b = _a === void 0 ? {} : _a, _c = _b.runtimePath, runtimePath = _c === void 0 ? '@stylable/runtime' : _c, _d = _b.runtimeStylesheetId, runtimeStylesheetId = _d === void 0 ? 'module' : _d, _e = _b.injectCSS, injectCSS = _e === void 0 ? true : _e, _f = _b.renderableOnly, renderableOnly = _f === void 0 ? false : _f, legacyRuntime = _b.legacyRuntime; | ||
var stylable = core_1.Stylable.create(stylableOptions); | ||
if (legacyRuntime && runtimePath === '@stylable/runtime') { | ||
runtimePath = '@stylable/runtime/cjs/index-legacy'; | ||
} | ||
return function stylableToModule(source, path) { | ||
@@ -10,0 +13,0 @@ var res = stylable.transform(source, path); |
{ | ||
"name": "@stylable/module-utils", | ||
"version": "2.0.10", | ||
"version": "2.1.0", | ||
"description": "Stylable module creation utilities", | ||
@@ -14,3 +14,3 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^2.0.9" | ||
"@stylable/core": "^2.1.0" | ||
}, | ||
@@ -28,3 +28,3 @@ "files": [ | ||
"license": "BSD-3-Clause", | ||
"gitHead": "c5d03f01e0d44533d093935784b20c66e602fcea" | ||
"gitHead": "64960865befc97447931d6b5cd76ee940c18aa51" | ||
} |
@@ -9,2 +9,3 @@ import { Stylable, StylableConfig } from '@stylable/core'; | ||
renderableOnly: boolean; | ||
legacyRuntime: boolean; | ||
} | ||
@@ -18,7 +19,10 @@ | ||
injectCSS = true, | ||
renderableOnly = false | ||
renderableOnly = false, | ||
legacyRuntime | ||
}: Partial<Options> = {} | ||
) { | ||
const stylable = Stylable.create(stylableOptions); | ||
if (legacyRuntime && runtimePath === '@stylable/runtime') { | ||
runtimePath = '@stylable/runtime/cjs/index-legacy'; | ||
} | ||
return function stylableToModule(source: string, path: string) { | ||
@@ -25,0 +29,0 @@ const res = stylable.transform(source, path); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17390
209
Updated@stylable/core@^2.1.0