command-installer
v0.2.2
Published
My bedazzling module
Downloads
11
Maintainers
Readme
command-installer
create original command for mac
Install
$ npm install --save command-installer
Usage
create command file.
$ echo 'echo hello world' >> hello.sh
$ chmod +x hello.sh
run.
const commandInstaller = require('command-installer');
commandInstaller(`${__dirname}/hello.sh`, 'hello').then(() => {
console.log('register hello command');
});
result.
$ hello
// => hello world
API
commandInstaller(commandPath, commandName)
commandPath
Required
Type: string
command path
commandName
Required
Type: string
command name
License
MIT © akameco