Permalink
Browse files

Merge pull request #8 from tomekwi/patch-2

Update cross-shell notes
  • Loading branch information...
mattdesl committed Oct 16, 2015
2 parents 7e087c6 + c044212 commit 87df354f5b6c1eb78ca76fc0c555885c60740d8f
Showing with 3 additions and 2 deletions.
  1. +3 −2 README.md
View
@@ -252,7 +252,8 @@ If you're writing small CommonJS modules, you typically won't need to have any t
Many npm scripts depend on Unix-only or bash-only features. If you want to make sure your scripts are platform-independent, keep these in mind:
* Only use cross-shell operators: `>`, `>>`, `<`, `|`, `&&` and `||`. They work in bash, Windows Command Prompt, [fish](http://fishshell.com/), and others. You can use tools like [npm-run-all](https://www.npmjs.com/package/npm-run-all) to execute tasks sequentially or in parallel.
* Only use cross-shell operators: `>`, `>>`, `<`, `|`, `&&` and `||`. They work in POSIX-compliant shells (bash, sh, zsh) and Windows Command Prompt. You can use tools like [concurrently](https://www.npmjs.com/package/concurrently) to run commands sequentially or in parallel.
* Avoid single quotes (`'`). Use escaped double quotes (`\"`) instead.
* Instead of platform-specific tools, use node modules with a CLI – for example [`mkdirp`](https://www.npmjs.com/package/mkdirp) instead of `mkdir`, [`cpy`](https://www.npmjs.com/package/cpy) instead of `cp`, [`mve`](https://www.npmjs.com/package/mve) instead of `mv`, or [`rimraf`](https://www.npmjs.com/package/rimraf) instead of `rm`
## UMD builds
@@ -282,4 +283,4 @@ Examples:
## more ... ?
Feel free to submit issues/PRs to this repo if you have suggestions or comments.
Feel free to submit issues/PRs to this repo if you have suggestions or comments.

0 comments on commit 87df354

Please sign in to comment.