simple-auto-script
A simple script to reduce duplicate work.
Last updated a month ago by z7fiv5 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install simple-auto-script 
SYNC missed versions from official npm registry.

auto-script

A simple script to reduce duplicate work.

Usage

$ npm install -g auto-script
$ auto-script COMMAND
running command...
$ auto-script (-v|--version|version)
auto-script/0.0.0 darwin-x64 node-v11.10.0
$ auto-script --help [COMMAND]
USAGE
  $ auto-script COMMAND
...

Commands

auto-script help [COMMAND]

display help for auto-script

USAGE
  $ auto-script help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

auto-script run

读取 autoscript.config.json 并执行脚本

USAGE
  $ auto-script run

OPTIONS
  -c, --config=config  指定配置文件
  -h, --help           显示帮助信息

EXAMPLE
  $ auto-script run

See code: src/commands/run.ts

configuration

example

{
  "web-portal": {
    "path": "/Users/wuzheqing/Documents/work/web-portal",
    "shell": [
      "npm run updateAll",
      "git add .",
      "git commit -m 'update'",
      "git push origin",
      "git push dice master_zoina_6:develop"
    ]
  },
  ...
}

每个 Task 以名字作 key, 并且会有两个属性: path 、shell

path (string)

要执行脚本的绝对路径

shell (string[])

要执行的脚本, 同步执行, 脚本之间没有上下环境切换

bad:

{
  "task": {
    "path": "/User/path/dir",
    "shell": ["mkdir example", "cd ./example", "touce test.js"]
  }
}

good:

{
  "task": {
    "path": "/User/path/dir",
    "shell": ["mkdir example", "cd ./example && touce test.js"]
  }
}

Current Tags

  • 0.0.0                                ...           latest (a month ago)

1 Versions

  • 0.0.0                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 17
Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |