4.1.0-2 • Published 2 years ago

@xpack/cmd-shim v4.1.0-2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@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.

npm version

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.