@stylable/module-utils
Advanced tools
Comparing version 2.2.6 to 2.2.7-alpha.0
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,3 +22,3 @@ var core_1 = require("@stylable/core"); | ||
var res = stylable.transform(source, path); | ||
return module_source_1.generateModuleSource(res, runtimeStylesheetId === 'module' ? 'module.id' : res.meta.namespace, staticImports.map(function (request) { return "import " + JSON.stringify(request); }).concat([ | ||
return module_source_1.generateModuleSource(res, runtimeStylesheetId === 'module' ? 'module.id' : res.meta.namespace, __spreadArrays(staticImports.map(function (request) { return "import " + JSON.stringify(request); }), [ | ||
"const runtime = require(" + JSON.stringify(runtimePath) + ")" | ||
@@ -18,0 +25,0 @@ ]), "runtime.$", "runtime.create", "runtime.createRenderable", injectCSS ? JSON.stringify(res.meta.outputAst.toString()) : '""', '-1', // ToDo: calc depth for node as well |
"use strict"; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -33,8 +40,8 @@ function generateModuleSource(stylableResult, moduleId, beforeModule, renderer, createFunction, createRenderableFunction, css, depth, exportsArgument, afterModule, renderableOnly) { | ||
var importKey = renderableOnly ? 'createRenderable' : 'create'; | ||
return generateModuleSource(stylableResult, moduleId, staticRequests.map(function (request) { return "import " + JSON.stringify(request); }).concat([ | ||
return generateModuleSource(stylableResult, moduleId, __spreadArrays(staticRequests.map(function (request) { return "import " + JSON.stringify(request); }), [ | ||
"import { $, " + importKey + " } from " + JSON.stringify(runtimeRequest) | ||
]), "$", "create", "createRenderable", includeCSSInJS ? JSON.stringify(stylableResult.meta.outputAst.toString()) : '""', depth, 'const { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css }', // = $ | ||
["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"].concat(afterModule).join('\n'), renderableOnly); | ||
__spreadArrays(["export { classes, keyframes, vars, stVars, cssStates, style, st, $depth, $id, $css };"], afterModule).join('\n'), renderableOnly); | ||
case 'cjs': | ||
return generateModuleSource(stylableResult, moduleId, staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }).concat([ | ||
return generateModuleSource(stylableResult, moduleId, __spreadArrays(staticRequests.map(function (request) { return "require(" + JSON.stringify(request) + ")"; }), [ | ||
"const runtime = require(" + JSON.stringify(runtimeRequest) + ")" | ||
@@ -41,0 +48,0 @@ ]), "runtime.$", "runtime.create", "runtime.createRenderable", includeCSSInJS ? JSON.stringify(stylableResult.meta.outputAst.toString()) : '""', depth, 'module.exports', afterModule.join('\n'), renderableOnly); |
{ | ||
"name": "@stylable/module-utils", | ||
"version": "2.2.6", | ||
"version": "2.2.7-alpha.0", | ||
"description": "Stylable module creation utilities", | ||
@@ -14,3 +14,3 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^2.1.4" | ||
"@stylable/core": "^2.1.5-alpha.0" | ||
}, | ||
@@ -28,3 +28,3 @@ "files": [ | ||
"license": "BSD-3-Clause", | ||
"gitHead": "c0a682c5acd5f54f96bddf10f3c3f18e81552603" | ||
"gitHead": "afc507c97909ce8d221ca4dc90344fadbc0e385a" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
20376
250
2