fix: use sass instead of node-sass
This commit is contained in:
parent
b51073ad6b
commit
22bac128ba
3
build.js
3
build.js
|
@ -24,8 +24,9 @@ let cssFiles = readdirSync(join(__dirname, 'src'));
|
||||||
// Generate all the SCSS using the CLI
|
// Generate all the SCSS using the CLI
|
||||||
console.log(logMeta + 'generating SASS/SCSS -> CSS');
|
console.log(logMeta + 'generating SASS/SCSS -> CSS');
|
||||||
const outputStyle = process.env.STYLE_ENV === 'dev' ? 'expanded' : 'compressed';
|
const outputStyle = process.env.STYLE_ENV === 'dev' ? 'expanded' : 'compressed';
|
||||||
|
mkdirpSync('temp/');
|
||||||
for (const cssFile of cssFiles) {
|
for (const cssFile of cssFiles) {
|
||||||
execSync(`npx node-sass src/${cssFile}/ --output-style ${outputStyle} -o ${tempPath}`);
|
execSync(`yarn sass --no-source-map --style ${outputStyle} src/${cssFile}/${cssFile}.s* ${tempPath}/${cssFile}.css`);
|
||||||
console.log(`${logMeta}✔ ${cssFile}`);
|
console.log(`${logMeta}✔ ${cssFile}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
"node-sass": "^4.11.0",
|
|
||||||
"nodemon": "^1.18.10",
|
"nodemon": "^1.18.10",
|
||||||
|
"sass": "^1.22.12",
|
||||||
"stylelint": "^9.10.1",
|
"stylelint": "^9.10.1",
|
||||||
"stylelint-config-recommended": "^2.1.0",
|
"stylelint-config-recommended": "^2.1.0",
|
||||||
"stylelint-scss": "^3.5.4",
|
"stylelint-scss": "^3.5.4",
|
||||||
|
@ -27,7 +27,10 @@
|
||||||
},
|
},
|
||||||
"xo": {
|
"xo": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"object-curly-spacing": ["error", "always"]
|
"object-curly-spacing": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"space": true
|
"space": true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue