@stylable/module-utils
Advanced tools
Comparing version 2.2.2 to 2.2.4
@@ -7,5 +7,7 @@ "use strict"; | ||
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, _g = _b.staticImports, staticImports = _g === void 0 ? [] : _g; | ||
var afterModule = ''; | ||
var stylable = core_1.Stylable.create(stylableOptions); | ||
if (legacyRuntime && runtimePath === '@stylable/runtime') { | ||
runtimePath = '@stylable/runtime/cjs/index-legacy'; | ||
afterModule += 'module.exports.default = module.exports;'; | ||
} | ||
@@ -17,3 +19,3 @@ return function stylableToModule(source, path) { | ||
]), "runtime.$", "runtime.create", "runtime.createRenderable", injectCSS ? JSON.stringify(res.meta.outputAst.toString()) : '""', '-1', // ToDo: calc depth for node as well | ||
'module.exports', '', renderableOnly); | ||
'module.exports', afterModule, renderableOnly); | ||
}; | ||
@@ -20,0 +22,0 @@ } |
{ | ||
"name": "@stylable/module-utils", | ||
"version": "2.2.2", | ||
"version": "2.2.4", | ||
"description": "Stylable module creation utilities", | ||
@@ -10,7 +10,7 @@ "main": "cjs/index.js", | ||
"build": "ts-build ./src --cjs", | ||
"test": "mocha -r @ts-tools/node/r \"test/**/*.spec.ts?(x)\" --watch-extensions ts,tsx", | ||
"test": "mocha \"test/**/*.spec.ts?(x)\"", | ||
"prepack": "yarn build" | ||
}, | ||
"dependencies": { | ||
"@stylable/core": "^2.1.1" | ||
"@stylable/core": "^2.1.3" | ||
}, | ||
@@ -28,3 +28,3 @@ "files": [ | ||
"license": "BSD-3-Clause", | ||
"gitHead": "4666c8c1e3d320d678e4c78b502ce33f2dc9bb2b" | ||
"gitHead": "dcc4099d179ea4fdf3adc54c325b6175ff484266" | ||
} |
@@ -16,3 +16,2 @@ # @stylable/module-utils | ||
## License | ||
Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by an [BSD license](./LICENSE). |
@@ -24,5 +24,7 @@ import { Stylable, StylableConfig } from '@stylable/core'; | ||
) { | ||
let afterModule = ''; | ||
const stylable = Stylable.create(stylableOptions); | ||
if (legacyRuntime && runtimePath === '@stylable/runtime') { | ||
runtimePath = '@stylable/runtime/cjs/index-legacy'; | ||
afterModule += 'module.exports.default = module.exports;' | ||
} | ||
@@ -44,3 +46,3 @@ return function stylableToModule(source: string, path: string) { | ||
'module.exports', | ||
'', | ||
afterModule, | ||
renderableOnly | ||
@@ -47,0 +49,0 @@ ); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
19261
233
17
1
Updated@stylable/core@^2.1.3