Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@xpack/cmd-shim

xpack3kISC4.1.0-2

Used in xpm for command line application support

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.

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.