├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── npm-logo.png
├── package-lock.json
├── package.json
└── readme.md
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on:
3 | push:
4 | branches: master
5 | pull_request:
6 | jobs:
7 | lint:
8 | name: Run awesome-lint
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | with:
13 | fetch-depth: 0
14 | - uses: actions/setup-node@v3
15 | with:
16 | node-version: latest
17 | - run: npm install
18 | - run: npm test
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 | *.pid.lock
11 |
12 | # Directory for instrumented libs generated by jscoverage/JSCover
13 | lib-cov
14 |
15 | # Coverage directory used by tools like istanbul
16 | coverage
17 |
18 | # nyc test coverage
19 | .nyc_output
20 |
21 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22 | .grunt
23 |
24 | # node-waf configuration
25 | .lock-wscript
26 |
27 | # Compiled binary addons (http://nodejs.org/api/addons.html)
28 | build/Release
29 |
30 | # Dependency directories
31 | node_modules
32 | jspm_packages
33 |
34 | # Optional npm cache directory
35 | .npm
36 |
37 | # Optional eslint cache
38 | .eslintcache
39 |
40 | # Optional REPL history
41 | .node_repl_history
42 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Guidelines
2 |
3 | Ensure your pull request adheres to the following guidelines:
4 |
5 | - Search previous suggestions before making a new one, as yours may be a duplicate.
6 | - Suggested packages should be tested and documented.
7 | - Make an individual pull request for each suggestion.
8 | - Use the following format: `[package](link) - Description.`
9 | - Additions should be added to the bottom of the relevant category.
10 | - New categories, or improvements to the existing categorization are welcome.
11 | - Please run `npm run doctoc` after making changes to the headings to regenerate the Contents section.
12 | - Link to the GitHub repo, not npmjs.com.
13 | - Keep descriptions short and simple, but descriptive.
14 | - Start the description with a capital and end with a full stop/period.
15 | - Check your spelling and grammar.
16 | - Make sure your text editor is set to remove trailing whitespace.
17 | - The pull request should have a useful title and include a link to the package and why it should be included.
18 | - You can run `npm test` to ensure that you haven't made any errors (Thanks to [awesome-lint](https://github.com/sindresorhus/awesome-lint)).
19 |
20 | Thank you for your suggestions!
21 |
22 | This is an [OPEN Open Source Project](http://openopensource.github.io/).
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | CC0 1.0 Universal
2 | =================
3 |
4 | Statement of Purpose
5 | --------------------
6 |
7 | The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
8 |
9 | Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
10 |
11 | For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
12 |
13 | 1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
14 |
15 | i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
16 |
17 | ii. moral rights retained by the original author(s) and/or performer(s);
18 |
19 | iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
20 |
21 | iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
22 |
23 | v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
24 |
25 | vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
26 |
27 | vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
28 |
29 | 2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
30 |
31 | 3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
32 |
33 | 4. __Limitations and Disclaimers.__
34 |
35 | a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
36 |
37 | b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
38 |
39 | c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
40 |
41 | d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
42 |
--------------------------------------------------------------------------------
/npm-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RyanZim/awesome-npm-scripts/12a4d9e2ce87d058afc3d96a41a77ea2f4434a1a/npm-logo.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "awesome-npm-scripts",
3 | "version": "1.0.0",
4 | "private": true,
5 | "license": "CC0-1.0",
6 | "scripts": {
7 | "test": "awesome-lint",
8 | "doctoc": "doctoc README.md"
9 | },
10 | "devDependencies": {
11 | "awesome-lint": "^0.18.0",
12 | "doctoc": "^2.2.1"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Awesome npm Scripts [](https://awesome.re)
3 |
4 | [
](https://www.npmjs.com)
5 |
6 | > Everything awesome for using npm as a build tool.
7 |
8 | You might also like [awesome-npm](https://github.com/sindresorhus/awesome-npm).
9 |
10 | **Notice: I'm currently too busy to actively expand this list; therefore, I've decided to make this an [OPEN Open Source Project](http://openopensource.github.io/). Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit.**
11 |
12 | ## Contents
13 |
14 |
15 |
16 |
17 | - [Articles](#articles)
18 | - [Videos/Talks](#videostalks)
19 | - [Task Runners](#task-runners)
20 | - [File Watchers](#file-watchers)
21 | - [Dev Servers](#dev-servers)
22 | - [Cross-platform Utilities](#cross-platform-utilities)
23 | - [Utility Packs](#utility-packs)
24 | - [Other Utilities](#other-utilities)
25 | - [Miscellaneous](#miscellaneous)
26 | - [Cross-platform Shell Reference](#cross-platform-shell-reference)
27 | - [`npm run` Reference](#npm-run-reference)
28 |
29 |
30 |
31 | ## Articles
32 |
33 | - [Why we should stop using Grunt & Gulp](https://www.keithcirkel.co.uk/why-we-should-stop-using-grunt/) - Blog post by Keith Cirkel.
34 | - [How to Use npm as a Build Tool](https://www.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/) - Sequel to »Why we should stop using Grunt & Gulp«.
35 | - [Why I Left Gulp and Grunt for npm Scripts](https://medium.freecodecamp.com/why-i-left-gulp-and-grunt-for-npm-scripts-3d6853dd22b8) - Article by Cory House.
36 | - [Helpers and tips for npm run scripts](http://michael-kuehnel.de/tooling/2018/03/22/helpers-and-tips-for-npm-run-scripts.html) - Blog post by Michael Kühnel covering advanced topics.
37 | - [Running cross-platform tasks via npm package scripts](https://exploringjs.com/nodejs-shell-scripting/ch_package-scripts.html) - The most comprehensive guide to using npm Scripts by Dr. Axel Rauschmayer.
38 |
39 | ## Videos/Talks
40 |
41 | - [Advanced front-end automation with npm scripts](https://www.youtube.com/watch?v=0RYETb9YVrk) - Talk at Nordic.js 2015 by Kate Hudson.
42 | - [How to create a build system with npm scripts](http://www.penta-code.com/how-to-create-a-build-system-with-npm-scripts/) - Video tutorial series on setting up a front-end build system.
43 |
44 | ## Task Runners
45 |
46 | Tools for running multiple commands or npm scripts in parallel or sequentially.
47 |
48 | - [script-runner](https://github.com/paulpflug/script-runner) - Simple task runner with a terse syntax.
49 | - [npm-run-all](https://github.com/mysticatea/npm-run-all) - Fully featured task runner.
50 | - [redrun](https://github.com/coderaiser/redrun) - Expand scripts from package.json to improve execution speed.
51 |
52 | ## File Watchers
53 |
54 | Tools to watch your source files and run a build command whenever any of the files change.
55 |
56 | - [onchange](https://github.com/Qard/onchange) - `onchange -- `.
57 | - [watch](https://github.com/mikeal/watch) - `watch `.
58 |
59 | ## Dev Servers
60 |
61 | - [http-server](https://github.com/indexzero/http-server) - Simple zero-configuration command-line http server.
62 | - [live-server](https://github.com/tapio/live-server) - Simple development http server with live reload capability.
63 |
64 | ## Cross-platform Utilities
65 |
66 | Utilities to perform common command-line tasks without worrying about cross-platform compatibility.
67 |
68 | - [rimraf](https://github.com/isaacs/rimraf) - Delete files or directories; like `rm -rf`.
69 | - [del-cli](https://github.com/sindresorhus/del-cli) - Safer file and folder deletion.
70 | - [mkdirp](https://github.com/substack/node-mkdirp) - Create a directory, creating parent directories if needed; like `mkdir -p`.
71 | - [cpr](https://github.com/davglass/cpr) - `cp -r` for Node.js.
72 | - [cpy-cli](https://github.com/sindresorhus/cpy-cli) - File/directory copying/renaming.
73 | - [copyfiles](https://github.com/calvinmetcalf/copyfiles) - Copy a list of files into a directory.
74 | - [sync-files](https://github.com/byteclubfr/node-sync-files) - `rsync`-like directory syncing with watch mode.
75 | - [echo-cli](https://github.com/iamakulov/echo-cli) - Cross-platform `echo` with JS escape sequence support.
76 | - [clear-cli](https://github.com/sindresorhus/clear-cli) - Clear the terminal.
77 | - [cross-env](https://github.com/kentcdodds/cross-env) - Set environment variables for scripts, unix-style.
78 | - [cross-os](https://github.com/milewski/cross-os) - Run platform-specific npm scripts.
79 | - [ntee](https://github.com/stefanmaric/ntee) - Utility that reads from standard input and writes to standard output and files; like Unix `tee`.
80 | - [catw](https://github.com/substack/catw) - Print a file to stdout, with optional watch mode; sorta like Unix `cat`.
81 |
82 | ### Utility Packs
83 |
84 | - [shx](https://github.com/shelljs/shx) - Collection of common Unix utilities implemented in Node.js; example usage: `shx rm somefile`.
85 |
86 | ## Other Utilities
87 |
88 | - [hashmark](https://github.com/keithamus/hashmark) - Take contents of a file and output as new file with a hash in the name.
89 | - [gzip-size-cli](https://github.com/sindresorhus/gzip-size-cli) - Get the gzipped size of a file or stdin.
90 | - [opn-cli](https://github.com/sindresorhus/opn-cli) - Open websites, files, executables, etc. with the user's preferred application.
91 | - [headr](https://github.com/heldr/headr) - Add header / banner info to a file.
92 | - [Bower files CLI](https://github.com/thompsonemerson/bower-files-cli) - Get main bower files on the command line.
93 | - [cli-error-notifier](https://github.com/micromata/cli-error-notifier) - Send native desktop notifications when npm scripts fail.
94 |
95 | ## Miscellaneous
96 |
97 | - [screwy](https://github.com/samueleaton/screwy) - The npm scripts GUI.
98 | - [Forrest](https://github.com/stefanjudis/forrest) - npm scripts desktop client.
99 | - [run-npm](https://github.com/timoxley/npm-run) - Run locally-installed node module executables. Useful for debugging npm scripts.
100 | - [npm-quick-run](https://github.com/bahmutov/npm-quick-run) - Quickly run npm scripts by prefix without typing the full name.
101 | - [edit-script](https://github.com/RyanZim/edit-script) - Edit npm scripts from the command line without worrying about JSON escaping.
102 | - [ntl](https://github.com/ruyadorno/ntl) - Interactive cli menu to list and run npm scripts.
103 |
104 | ## Cross-platform Shell Reference
105 |
106 | A quick reference of the shell operators & commands that work the same on Unix and Windows.
107 |
108 | - Use `&&` to run commands in sequence. If a command fails, the script exits.
109 | - Use `|` to pipe the stdout of one command into the stdin of the next. (`do-something | something else`)
110 | - Use `>` to write the stdout of a command to a file. (`do-something > file`)
111 | - Use `<` to send the contents of a file to a command's stdin. (`command < file`)
112 | - Use `cd ` to change the current working directory to ``. Note that `cd` alone prints the current working directory on windows, but changes the working directory to `~` on \*nix.
113 |
114 | ## `npm run` Reference
115 |
116 | You can use `npm run-script` or `npm run`; they both do the same thing, but `npm run` is shorter.
117 |
118 | - Run just `npm run` to print a list of scripts.
119 | - Running `npm run script` (where `script` is the name of your script) will run `prescript`, `script`, and `postscript`; in that order.
120 | - You can't nest `pre` and `post` hooks (i.e. `preprescript` won't work).
121 | - 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`.
122 | - Running `npm test` is the same as running `npm run test`. The same applies to `npm start` and `npm stop`.
123 | - You can run `npm run