Created
June 26, 2016 10:14
-
-
Save wmakeev/50170ad7846199f24108cce4ca081552 to your computer and use it in GitHub Desktop.
NPM build scripts examples
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
// from https://github.com/stoeffel/compose-function/blob/master/package.json | |
"scripts": { | |
"clean": "git reset && echo '/node_modules/' > .gitignore && git add .gitignore && git stash save --include-untracked --keep-index '`npm run clean` trash can' && git clean --force -d && git reset --hard && echo '\nclean: Uncommitted and ignored files have been moved to gitâs stash. To restore them run `git stash pop --quiet; git checkout .gitignore`.'", | |
"coverage": "rm -rf coverage && npm run test:transpile && cd .es5 && istanbul cover test.js && mv coverage ..", | |
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls", | |
"develop": "nodangel --ignore node_modules --ignore coverage --exec 'npm run --silent test:lite'", | |
"prepublish": "npm run --silent clean && npm run transpile", | |
"patch-release": "npm version patch && npm publish && git push --follow-tags", | |
"minor-release": "npm version minor && npm publish && git push --follow-tags", | |
"major-release": "npm version major && npm publish && git push --follow-tags", | |
"test": "eslint --ignore-path .gitignore .; npm run test:transpile && node .es5/test.js | tap-spec", | |
"test:lite": "babel-node --optional es7.functionBind test.js | tap-spec", | |
"test:transpile": "rm -rf .es5 && babel --optional es7.functionBind test.js test/*.js --out-dir .es5 && babel module/*.js --out-dir .es5", | |
"transpile": "babel module --out-dir .", | |
"view-coverage": "echo 'Generating coverage reports…'; npm run coverage >/dev/null && echo '…done.' && opn ./coverage/lcov-report/index.html >/dev/null" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment