GithubHelp home page GithubHelp logo

eush77 / scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from npm-scripts/scripts

0.0 2.0 0.0 92 KB

Collection of useful npm-scripts!

Home Page: http://git.io/npm-scripts

License: MIT License

JavaScript 100.00%

scripts's Introduction

Collection of useful npm-scripts!

TOC

patch-release

Publish a patch release of a package

"scripts": {
  "patch-release": "npm version patch && npm publish && git push --follow-tags"
}

minor-release

Publish a minor release of a package

"scripts": {
  "minor-release": "npm version minor && npm publish && git push --follow-tags"
}

major-release

Publish a major release of a package

"scripts": {
  "major-release": "npm version major && npm publish && git push --follow-tags"
}

clean-up

Clean your git repo state. All dirty files will be moved to the stash. It’s useful when transpiling code before publishing to NPM.

"scripts": {
  "clean-up": "git reset && echo '/node_modules/' > .gitignore && git add .gitignore && git stash save --include-untracked --keep-index '`npm run clean-up` trash can' && git clean --force -d && git reset --hard && echo '\nclean-up: All unstaged and ignored files within your git repo – except node_modules/* – have been moved to the stash. To restore them run `git stash pop --quiet; git checkout .gitignore`."
}

Bower postinstall

Bower install before npm

"scripts": {
  "postinstall": "bower install"
}

gh-pages

Pushs a folder (f.e. docs) to the gh-pages branch.

"scripts": {
  "update-gh-pages": "git push origin `git subtree split --prefix docs master`:gh-pages --force"
}

develop

Watch JS files and run npm test on every change. Remember to npm install --save-dev nodangel before using this.

"scripts": {
  "develop": "nodangel --ignore node_modules --ignore coverage --exec 'npm run --silent test'"
}

diffy-package

Make the package.json more diff-friendly. Remember to npm install --save-dev format-json mve before adding this script. Add "postversion": "npm run diffy-package" as well to auto-format the package file after a version bump. Add "postinstall": "npm run diffy-package" if you’re not writing a library – your package file will be reformatted every time you run npm install --save.

"scripts": {
  "diffy-package": "format-json package.json > .temp; mve .temp package.json"
}

scripts's People

Contributors

hemanth avatar jamiebuilds avatar stoeffel avatar

Watchers

James Cloos avatar Eugene Sharygin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.