Skip to content

Instantly share code, notes, and snippets.

@agauniyal
Created September 12, 2015 14:51
Show Gist options
  • Save agauniyal/923bd148fe019eb3594c to your computer and use it in GitHub Desktop.
Save agauniyal/923bd148fe019eb3594c to your computer and use it in GitHub Desktop.
Essential npm scripts
"scripts": {
"test": "npm run lint",
"lint": "csslint --format=compact css/*.css",
"clean": "rimraf css/",
"build:sass2css": "npm run clean && node-sass sass/ -o css/",
"build:prefix": "cd css/ && autoprefixer-cli -b 'last 2 versions' *.css",
"build:minify": "cd css/ && cat normalize.css `ls -I normalize.css -I main.min.css` | cleancss -o main.min.css",
"build:clean": "cd css/ && find . -type f ! -name '*.min.css' -delete",
"build": "npm run build:sass2css && npm run build:prefix && npm run build:minify && npm run build:clean",
"build:watch": "watch 'npm run build' sass/"
},
"devDependencies": {
"node-sass": "latest",
"csslint": "latest",
"autoprefixer-cli": "latest",
"autoprefixer ": "latest",
"clean-css": "latest",
"rimraf": "latest",
"watch": "latest"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment