newcmd
v2.1.5
Published
A simple command line creater for NodeJS
Downloads
43
Readme
newcmd
Command Line Maker
INSTALLATION
BASH
npm install newcmd
CREATING COMMANDs
BASH
newcmd firstCommand file.js
Create your command by using the syntax newcmd <command name> <file name>.js
BASH
npm init --yes
Note you must init your project.
JAVASRIPT / file.js
function newcmd(args){ // You must name your command newcmd
console.log(args); // consoles all args
}
In your file you will write a function named newcmd, you can add a parameter to add arguments.
LINK YOUR FILE
npm link
SYNTAX
newcmd <command name> <command file>.js
: Creates a command.function newcmd(){}
: The function that will be ran for this command.