A quick way to return desired npm run methods to terminal.
I built this for my own quality of life, I found it was helpful while working with many projects at once. I also wanted to work with Go on more simple CLI projects. Yes, I know you can easily run a few UNIX comamnds with a pipe to get the same result.
- Read a folder
- Create read buffer for package.json
- Build structs based on commonly used phrases for npm run save to local variable
- Decode package json file for any key names in 'scripts' object save to local variable
- Parse given args for the npm command the user is looking for
- Return the command to output
- Scan specific directories (server/client)
- If not found, return the entire list. User is able to hit a key to select desired command to paste to output.
$ git clone https://github.com/ncolletti/npwut
$ cd npwut
$ go build
$ mkdir ~/bin
$ mv npwut ~/bin
$ BASH: export PATH=$PATH:/home/<user>/bin
or
$ ZSH: path+=('/home/<user>/bin')
$ chmod u+x /home/<user>/bin/npwut
- Environment preset (dev/prod)
- Write tests