@xpack/cmd-shim
v4.1.0-2
Published
Used in xpm for command line application support
Downloads
242
Readme
@xpack/cmd-shim
Fork of cmd-shim, used
by xpm
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.
Installation
npm install @xpack/cmd-shim
API
cmdShim(from, to) -> Promise
Create a cmd shim at to
for the command line program at from
.
e.g.
var cmdShim = require('@xpack/cmd-shim');
cmdShim(__dirname + '/cli.js', '/usr/bin/command-name').then(() => {
// shims are created!
})
cmdShim.ifExists(from, to) -> Promise
The same as above, but will just continue if the file does not exist.