react-scoped-styles
Version:
Scoped styles for React components
11 lines (10 loc) • 413 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDirHash = void 0;
const path_1 = require("path");
const crypto_1 = require("crypto");
function createDirHash(contextPath) {
const dirPath = (0, path_1.relative)(process.cwd(), contextPath);
return (0, crypto_1.createHash)('md5').update(dirPath).digest('hex').slice(0, 10);
}
exports.createDirHash = createDirHash;