@stylable/build-tools
Advanced tools
Comparing version 4.12.0 to 4.13.0
@@ -1,2 +0,5 @@ | ||
export declare function loadStylableConfig<T>(context: string, extract: (config: any) => T): T | undefined; | ||
export declare function loadStylableConfig<T>(context: string, extract: (config: any) => T): { | ||
path: string; | ||
config: T; | ||
} | undefined; | ||
//# sourceMappingURL=load-stylable-config.d.ts.map |
@@ -21,3 +21,6 @@ "use strict"; | ||
} | ||
return extract(config); | ||
return { | ||
path, | ||
config: extract(config), | ||
}; | ||
} | ||
@@ -24,0 +27,0 @@ return undefined; |
{ | ||
"name": "@stylable/build-tools", | ||
"version": "4.12.0", | ||
"version": "4.13.0", | ||
"description": "Collection of helper functions for Stylable based tooling.", | ||
@@ -10,3 +10,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^4.12.0", | ||
"@stylable/core": "^4.13.0", | ||
"find-config": "^1.0.0" | ||
@@ -13,0 +13,0 @@ }, |
import findConfig from 'find-config'; | ||
export function loadStylableConfig<T>(context: string, extract: (config: any) => T): T | undefined { | ||
export function loadStylableConfig<T>( | ||
context: string, | ||
extract: (config: any) => T | ||
): { path: string; config: T } | undefined { | ||
const path = findConfig('stylable.config.js', { cwd: context }); | ||
@@ -19,5 +22,8 @@ let config; | ||
} | ||
return extract(config); | ||
return { | ||
path, | ||
config: extract(config), | ||
}; | ||
} | ||
return undefined; | ||
} |
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
25059
376
Updated@stylable/core@^4.13.0