Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-04-03 20:12:10 +0400
committerisaacs <i@izs.me>2013-04-03 20:12:10 +0400
commit42964846bfa74b3a0222d67a6b3b5cb9287d993b (patch)
treed67a45e9bc1b7b020f80311f00f826dab6ab148d /node_modules/cmd-shim/README.md
parent5f3fb144595dd08e37c6ac734ad8fa7f368163cc (diff)
cmd-shim@1.1.0
Diffstat (limited to 'node_modules/cmd-shim/README.md')
-rw-r--r--node_modules/cmd-shim/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/node_modules/cmd-shim/README.md b/node_modules/cmd-shim/README.md
new file mode 100644
index 000000000..fb997d5db
--- /dev/null
+++ b/node_modules/cmd-shim/README.md
@@ -0,0 +1,42 @@
+# cmd-shim
+
+The cmd-shim used in npm to create executable scripts on Windows,
+since symlinks are not suitable for this purpose there.
+
+On Unix systems, you should use a symbolic link instead.
+
+[![Build Status](https://travis-ci.org/ForbesLindesay/cmd-shim.png?branch=master)](https://travis-ci.org/ForbesLindesay/cmd-shim) [![Dependency Status](https://gemnasium.com/ForbesLindesay/cmd-shim.png)](https://gemnasium.com/ForbesLindesay/cmd-shim)
+
+## Installation
+
+```
+npm install cmd-shim
+```
+
+## API
+
+### cmdShim(from, to, cb)
+
+Create a cmd shim at `to` for the command line program at `from`.
+e.g.
+
+```javascript
+var cmdShim = require('cmd-shim');
+cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {
+ if (err) throw err;
+});
+```
+
+### cmdShim.ifExists(from, to, cb)
+
+The same as above, but will just continue if the file does not exist.
+Source:
+
+```javascript
+function cmdShimIfExists (from, to, cb) {
+ fs.stat(from, function (er) {
+ if (er) return cb()
+ cmdShim(from, to, cb)
+ })
+}
+```