@stylable/node
Advanced tools
Comparing version 1.0.6 to 1.0.7
import { processNamespace } from '@stylable/core'; | ||
export declare function resolveNamespaceFactory(prefix: string): typeof processNamespace; | ||
export declare function resolveNamespaceFactory(hashSalt?: string, prefix?: string): typeof processNamespace; | ||
export declare const resolveNamespace: typeof processNamespace; | ||
//# sourceMappingURL=resolve-namespace.d.ts.map |
@@ -9,3 +9,3 @@ "use strict"; | ||
const findConfig = require('find-config'); | ||
function resolveNamespaceFactory(prefix) { | ||
function resolveNamespaceFactory(hashSalt = '', prefix = '') { | ||
return (namespace, stylesheetPath) => { | ||
@@ -15,7 +15,7 @@ const configPath = findConfig('package.json', { cwd: path_1.dirname(stylesheetPath) }); | ||
const fromRoot = path_1.relative(path_1.dirname(configPath), stylesheetPath).replace(/\\/g, '/'); | ||
return prefix + namespace + murmurhash_1.default.v3(config.name + '@' + config.version + '/' + fromRoot); | ||
return prefix + namespace + murmurhash_1.default.v3(hashSalt + config.name + '@' + config.version + '/' + fromRoot); | ||
}; | ||
} | ||
exports.resolveNamespaceFactory = resolveNamespaceFactory; | ||
exports.resolveNamespace = resolveNamespaceFactory(''); | ||
exports.resolveNamespace = resolveNamespaceFactory(); | ||
//# sourceMappingURL=resolve-namespace.js.map |
{ | ||
"name": "@stylable/node", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Integrate Stylable into your node application", | ||
@@ -31,3 +31,3 @@ "main": "dist/index.js", | ||
"license": "BSD-3-Clause", | ||
"gitHead": "d155f832bfd8bfeeac185e5c8b7fd078ba193085" | ||
"gitHead": "af0700f833c1cb88cb9278f7555610e0470fcdef" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14046