@stylable/build-tools
Advanced tools
Comparing version 4.13.3 to 4.14.0
@@ -5,6 +5,10 @@ "use strict"; | ||
function hasImportedSideEffects(stylable, meta, imported) { | ||
//keyframes | ||
if (Object.keys(imported.keyframes).length) { | ||
// direct import usage | ||
const { keyframes, layer } = imported.typed; | ||
if (keyframes && Object.keys(keyframes).length) { | ||
return true; | ||
} | ||
if (layer && Object.keys(layer).length) { | ||
return true; | ||
} | ||
//compose usage | ||
@@ -11,0 +15,0 @@ for (const localSymbol of Object.values(meta.getAllClasses())) { |
@@ -9,3 +9,4 @@ "use strict"; | ||
function loadStylableConfig(context, extract) { | ||
const path = (0, find_config_1.default)('stylable.config.js', { cwd: context }); | ||
var _a; | ||
const path = (_a = (0, find_config_1.default)('stylable.config.js', { cwd: context })) !== null && _a !== void 0 ? _a : (0, find_config_1.default)('stylable.config.cjs', { cwd: context }); | ||
let config; | ||
@@ -12,0 +13,0 @@ if (path) { |
{ | ||
"name": "@stylable/build-tools", | ||
"version": "4.13.3", | ||
"version": "4.14.0", | ||
"description": "Collection of helper functions for Stylable based tooling.", | ||
@@ -10,3 +10,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^4.13.3", | ||
"@stylable/core": "^4.14.0", | ||
"find-config": "^1.0.0" | ||
@@ -13,0 +13,0 @@ }, |
import type { Imported, Stylable, StylableMeta } from '@stylable/core'; | ||
export function hasImportedSideEffects(stylable: Stylable, meta: StylableMeta, imported: Imported) { | ||
//keyframes | ||
if (Object.keys(imported.keyframes).length) { | ||
// direct import usage | ||
const { keyframes, layer } = imported.typed; | ||
if (keyframes && Object.keys(keyframes).length) { | ||
return true; | ||
} | ||
if (layer && Object.keys(layer).length) { | ||
return true; | ||
} | ||
@@ -9,0 +13,0 @@ //compose usage |
@@ -7,3 +7,5 @@ import findConfig from 'find-config'; | ||
): { path: string; config: T } | undefined { | ||
const path = findConfig('stylable.config.js', { cwd: context }); | ||
const path = | ||
findConfig('stylable.config.js', { cwd: context }) ?? | ||
findConfig('stylable.config.cjs', { cwd: context }); | ||
let config; | ||
@@ -10,0 +12,0 @@ if (path) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
25750
387
Updated@stylable/core@^4.14.0