1.3.0 • Published 9 years ago

nshm v1.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

nshm ( Node.js .sh Scripts Manager )

init your working directory with common useful .sh files

[中文版]

$ npm install nshm -g

$ nshm <command> [args...]

add a command

$ nshm add <command_name> -[t|f] [text|path]

example

# add file content
$ nshm add commit --file ./my-commit.sh
# or
$ nshm add commit -f ./my-commit.sh

# add text content
$ nshm add pull --text "git pull"
# or
$ nshm add pull -t "git pull"

combine current commands into one

$ nshm co <command_name> [command|text] [command|text] [command|text] [...]

example

$ nshm co git commit pull "git status"

remove existing command(s)

$ nshm rm <command_name> <command_name> <...> 

example

$ nshm rm commit pull git

remove all existing commands

$ nshm clean

list all existing commands

# view all names
$ nshm ls

# view all details
$ nshm ls -a

get version number

$ nshm -v
$ nshm --version

Demo-1

$ nshm add add -t "git add -A"
$ nshm add commit -t "git commit -m 'push'"
$ nshm add pull -t "git push"


$ nshm co git add commit pull

# init my directory
# then we'll get `add.sh` `commit.sh` `pull.sh`
$ nshm git 

Demo-2

# browserSync cli 
# here we use `${}` as placeholders
# for necessary params
$ nshm add bs -t "browser-sync start --server --files \"${files}\" --index \"${index}\" --open \"external\" --reload-debounce --no-notify"

# init my directory and get the `bs.sh`
$ nshm bs --file '**' --index 'index.html'
1.3.0

9 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago