mkht / pspm

PowerShell Package Manager
MIT License
13 stars 1 forks source link

Implement pspm run-script #6 #27

Closed mkht closed 6 years ago

mkht commented 6 years ago

User defined scripts

// package.json
{
  "scripts": {
    "hello":      "echo 'hello'"
  }
}
PS > pspm run hello
hello

Preserved scripts

// package.json
{
  "scripts": {
    "start":      "echo 'start'",
    "restart":   "echo 'restart'",
    "stop":      "echo 'stop'",
    "test":       "echo 'test'"
  }
}
PS > pspm start
start
PS > pspm restart
restart
PS > pspm stop
stop
PS > pspm test
test

pre / post hook

// package.json
{
  "scripts": {
    "prestart":      "echo 'prestart'",
    "start":            "echo 'start'",
    "poststart":     "echo 'poststart'"
  }
}
PS > pspm start
prestart
start
poststart