Giter VIP home page Giter VIP logo

awesome-npm-scripts's Introduction

Awesome npm scripts Awesome

Everything awesome related to npm scripts and using npm as a build tool.

You might also like awesome-npm.

Contents

Articles

Task Runners

Tools for running multiple commands or npm scripts in parallel or sequentially.

  • script-runner - Simple task runner with a terse syntax.
  • npm-run-all - Fully featured task runner.
  • redrun - Expand scripts from package.json to improve execution speed.

File Watchers

  • onchange - onchange <glob> -- <command>.
  • watch - watch <command> <directory>.

Dev Servers

  • http-server - A simple zero-configuration command-line http server.
  • live-server - Simple development http server with live reload capability.

Cross-platform Utilities

  • rimraf - Cross-platform rm -rf.
  • del-cli - Safer file and folder deletion.
  • mkdirp - Cross-platform mkdir -p.
  • copyfiles - Cross-platform file copying.
  • sync-files - Cross-platform rsync-like directory syncing with watch mode.
  • echo-cli - Cross-platform echo with JS escape sequence support.
  • clear-cli - Clear the terminal cross-platform.
  • cross-env - Set environment variables for scripts, unix-style.

Utility Packs

  • shx - Supports pwd, ls, rm, echo, touch, cp, and mkdir.

Other Utilities

  • hashmark - Take contents of a file and output as new file with a hash in the name.
  • gzip-size-cli - Get the gzipped size of a file or stdin.
  • opn-cli - Open websites, files, executables, etc. with the user's preferred application.

Miscellaneous

  • screwy - The npm scripts GUI.
  • Forrest - An npm scripts desktop client.
  • run-npm - Run locally-installed node module executables. Useful for debugging npm scripts.

Cross-platform Shell Reference

  • && runs commands in sequence. If a command fails, the script exits.
  • | pipes the stdout of one command into the stdin of the next. (do-something | something else)
  • > writes the stdout of a command to a file. (do-something > file)
  • < sends the contents of a file to a command's stdin. (command < file)
  • cd <dir> changes the current working directory to <dir>. Note that cd alone prints the current working directory on windows, but changes the working directory to ~ on *nix.

npm run Reference

You can use npm run-script or npm run; they both do the same thing, but npm run is shorter.

  • Run just npm run to print a list of scripts.
  • Running npm run script (where script is the name of your script) will run prescript, script, and postscript; in that order.
    • You can't nest pre and post hooks (i.e. preprescript won't work).
  • You can pass arguments to your scripts by passing -- to npm run, followed by the arguments. Example: Given the script "mocha": "mocha", you can run npm run mocha -- --reporter xunit. This effectively runs mocha --reporter xunit.
  • Running npm test is the same as running npm run test. The same applies to npm start and npm stop.
  • You can run npm run <script> -s to silence the default npm output (useful for calling a script within another script).

Contributing

See CONTRIBUTING.md.

License

CC0

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.