Skip to content

npm/cmd-shim

Folders and files

NameName
Last commit message
Last commit date
Aug 29, 2024
May 4, 2024
Oct 18, 2023
Dec 13, 2022
Aug 29, 2024
Dec 4, 2023
Aug 26, 2024
Apr 5, 2022
Aug 26, 2024
Aug 26, 2024
Jun 29, 2022
May 4, 2023
Aug 12, 2019
Mar 20, 2024
Aug 26, 2024
Aug 29, 2024
May 4, 2024

Repository files navigation

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

Installation

npm install 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('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.