Last active
November 14, 2018 05:19
-
-
Save anupjon/1f09fef296d6294dbc14094837bcfc12 to your computer and use it in GitHub Desktop.
Node script sass compiler
This file contains 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
npm install -g node-sass-chokidar autoprefixer chokidar-cli postcss-cli |
This file contains 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
{ | |
"name": "sass-compiler", | |
"version": "1.0.0", | |
"description": "Compile sass, scss files", | |
"themepath":"wp-config/themes/themename", | |
"scripts": { | |
"build-task:scss-compile": "node-sass-chokidar -r --source-map true --output-style compressed $npm_package_themepath/scss/style.scss -o $npm_package_themepath/css", | |
"build-task:autoprefixer": "postcss $npm_package_themepath/css/*.css --use autoprefixer -d $npm_package_themepath/css", | |
"scss:build": "npm run build-task:scss-compile && npm run build-task:autoprefixer", | |
"scss:watch": "chokidar $npm_package_themepath'/scss/**/*.scss' -c 'npm run scss:build'" | |
}, | |
"author": "Anoop John", | |
"license": "ISC" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment