How can I write my own terminal commands for an NPM project that would replace the gulp command without relying on npm run ?
My project contains the following gulp and http-server user commands ...
## COMMANDS I CURRENTLY HAVE | Command | Task | |-----------------------|-----------------------------| | npm run boom | "Builds then watches files" | | npm run boom -- build | "Builds the assets files" | | npm run launch | "Starts a local server" |
This is because of the scripts in the package.json file ...
Here is what I really would like my user commands to be ...
## COMMANDS I WANT TO HAVE | Command | Task | |-------------|-----------------------------| | boom | "Builds then watches files" | | boom build | "Builds the assets files" | | boom launch | "Starts a local server" |
EDIT
“ Can I add a debug version of the script in NPM? ” Is not the same as me. I already defined the scripts in my package.json file, this is how I ended up with my current commands. I want to write my own project commands / scripts that do the same thing as what I listed, without entering npm run .
Example
- I have
- What is he doing?
- What command do I want in the project instead, which does the same thing?
source share