Created
January 7, 2018 09:58
-
-
Save j-mes/9c37dceb0f91f56c9fa23f2d946d4baf to your computer and use it in GitHub Desktop.
Node Watch/Compile CSS+JS Task Runner
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
{ | |
"name": "wp-mnml", | |
"version": "1.0.0", | |
"license": "MIT", | |
"dependencies": { | |
"autoprefixer": "*", | |
"eslint": "*", | |
"nodemon": "*", | |
"npm-run-all": "*", | |
"node-sass": "*", | |
"rimraf": "*", | |
"postcss": "*", | |
"postcss-cli": "*", | |
"uglify-js": "*" | |
}, | |
"eslintConfig": { | |
"env": { | |
"es6": true, | |
"node": true, | |
"browser": true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
"no-console": "off" | |
} | |
}, | |
"scripts": { | |
"clean": "rimraf assets/{css/site.css,js/site.min.js}", | |
"autoprefixer": "postcss -u autoprefixer --autoprefixer.browsers '> 0.5%', 'IE 9' -r assets/css/*", | |
"js:uglify": "uglifyjs assets/js/site.js -m -o assets/js/site.min.js", | |
"js:lint": "eslint assets/js/site.js", | |
"sass": "node-sass --output-style compressed -o assets/css/ assets/scss/site.scss", | |
"build:css": "npm-run-all sass autoprefixer", | |
"watch:css": "nodemon --ext scss -x \"npm run build:css\"", | |
"build:js": "npm-run-all js:lint js:uglify", | |
"watch:js": "nodemon --ext js --ignore site.min.js -x \"npm run build:js\"", | |
"build": "npm-run-all build:css build:js", | |
"watch": "npm-run-all --parallel watch:css watch:js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment