Skip to content

ogty/typescript-cli-tool-template

Repository files navigation

TypeScript CLI Tool Template

⚙️ Setup

$ git clone https://github.com/ogty/typescript-cli-tool-template <project-name>
$ cd <project-name>

✏️ Rewriting Part

  1. bin/<command-name>.js
  2. package.json
    • "name": "<package-name>"
    • "bin": { "<command-name>": "./bin/<command-name>.js"}
    • "author": "<your-name>"

🏃 Run

$ make build
$ chmod  x ./bin/name.js
$ ./bin/name.js

📦 Publish

Npm account creation


$ make login
$ make publish

Note

If you get a 403 error

  • Conflicting package names(Not a unique name in the Nom package)
  • Version has not been changed since the last time

Please check either of the above

When you want to cancel a publish

$ make unpublish