"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/cmd-shim/README.md" (17 Oct 2016, 1123 Bytes) of archive /windows/misc/atom-windows.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.


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 Dependency Status NPM version


npm install cmd-shim


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) }) }