Created
December 9, 2019 17:58
-
-
Save benabraham/933889b292dc58970a9ea9cbbb3df9bc to your computer and use it in GitHub Desktop.
npm scripts to convert scss to css and autoprefix and minify using temporary file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "_css-sass2css": "node-sass --source-map-embed true --precision 6 --source-map-root \"/\" ./scss/style.scss ./css-temp/style.css", | |
| "_css-postcss": "postcss ./css-temp/style.css --use autoprefixer --output ./css-temp/style.css", | |
| "_css-minify": "csso --input ./css-temp/style.css --output ./css-temp/style.css --source-map ./css-temp/style.css.map", | |
| "_css-move": "ncp ./css-temp/ ./css/", | |
| "_css-cleanup": "rimraf ./css-temp", | |
| "css-compile": "npm run _css-sass2css && npm run _css-postcss && npm run _css-minify && npm run _css-move && npm run _css-cleanup", | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment