|
|
|
@ -23,8 +23,9 @@ let cssFiles = readdirSync(join(__dirname, 'src'));
|
|
|
|
|
|
|
|
|
|
// Generate all the SCSS using the CLI
|
|
|
|
|
console.log(logMeta + 'generating SASS/SCSS -> CSS');
|
|
|
|
|
const outputStyle = process.env.STYLE_ENV === 'dev' ? 'expanded' : 'compressed';
|
|
|
|
|
for (const cssFile of cssFiles) {
|
|
|
|
|
execSync(`npx node-sass src/${cssFile}/ --output-style compressed -o ${tempPath}`);
|
|
|
|
|
execSync(`npx node-sass src/${cssFile}/ --output-style ${outputStyle} -o ${tempPath}`);
|
|
|
|
|
console.log(`${logMeta}✔ ${cssFile}`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -62,7 +63,7 @@ for (const cssFile of cssFiles) {
|
|
|
|
|
const usercssLength = '==/UserStyle== */'.length;
|
|
|
|
|
css =
|
|
|
|
|
css.substring(0, usercssIndex + usercssLength) +
|
|
|
|
|
`\n@-moz-document domain(${usercss.namespace}) {\n ` +
|
|
|
|
|
`\n@-moz-document domain("${usercss.namespace}") {\n` +
|
|
|
|
|
css.substring(usercssIndex + usercssLength + 1, css.length) +
|
|
|
|
|
'}\n';
|
|
|
|
|
writeFileSync(cssPath, css);
|
|
|
|
|