Skip to content

Instantly share code, notes, and snippets.

@jerrylau91
Created March 16, 2016 02:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerrylau91/853d337d24e060328954 to your computer and use it in GitHub Desktop.
Save jerrylau91/853d337d24e060328954 to your computer and use it in GitHub Desktop.
npm scripts as a build tool
{
"scripts": {
"clean": "rm -f resources/css/style.css",
"autoprefixer": "postcss -u autoprefixer -r resources/css/style.css",
"scss": "node-sass --output-style compressed --source-map true resources/sass/PPP.scss resources/css/style.css",
"serve": "browser-sync start --proxy 'ping.dev' --files 'resources/css/*.css, resources/images/*'",
"build:css": "npm run scss && npm run autoprefixer",
"build": "npm run build:css",
"watch:css": "onchange 'resources/sass/*.scss' -- npm run build:css",
"start": "npm-run-all -p serve watch:css",
"postinstall": "npm run watch:all"
},
"keywords": [
"autoprefixer",
"node-sass",
"postcss",
"browser-sync",
"onchange"
],
"devDependencies": {
"autoprefixer": "^6.3.3",
"browser-sync": "^2.11.1",
"cz-conventional-changelog": "^1.1.5",
"eslint": "^2.2.0",
"imagemin-cli": "^2.1.0",
"merge-stream": "^1.0.0",
"node-sass": "^3.4.2",
"npm-run-all": "^1.5.1",
"onchange": "^2.0.0",
"postcss-cli": "^2.5.1",
"svg-sprite-generator": "0.0.7",
"svgo": "^0.6.1",
"uglify-js": "^2.6.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment