1.0.0 • Published 4 years ago

auto-run-script v1.0.0

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

auto-run

A cli tool to run npm-scripts or script by platform.

Why

Sometimes, we need to run different script for different platform. Such as:

{
    "scripts": {
        "echo:win32": "echo \"run win script\"",
        "echo:linux": "echo \"run linux script\"",
        "echo:darwin": "echo \"run darwin script\""
    }
}
  • Before: you should run npm run echo:win32 or npm run echo:linux

  • With this: just run auto-run echo:*

Usage

auto-run [script] [OPTIONS]

run the script(or name) by platform

Options:
  --version               Show version number           [boolean]
  --win32, -w, --windows  script or name for windows    [string]
  --darwin, -m, --mac     script or name for mac        [string]
  --linux, -l             script or name for linux      [string]
  --help, -h              Show help                     [boolean]