Skip to content
/ ts-starter Public template

Typescript starter repo with eslint setup

License

Notifications You must be signed in to change notification settings

lukasbach/ts-starter

Repository files navigation

CLI Typescript Commander Starter

A template repository for CLI tools based on Typescript and CommanderJs.

Features

  • Test setup with Jest
  • Eslint setup with airbnb defaults and prettier
  • Setup with Yarn
  • Builds for multiple targets cjs, esm and esnext
  • Github Actions CI Pipeline for testing and publishing

Setup template

  • Clone the template via the Use this template button or by clicking here.
  • Search for "TODO" in the project and adjust everything applicable, and replace "{NAME}" with your project name
  • (optionally) Add a secret to GitHub with the name npm_token to allow NPM releases
  • (optionally) enable packaging an exported CLI via pkg if enabled in the CI file
  • remove or adapt from the following sections to adjust to the package

How to use

Install globally via

npm install -g {NAME}

or directly use via

npx {NAME}

Usage:

Usage: npx {NAME} [options]

Options:
-V, --version            output the version number
-s, --small              small pizza size
-p, --pizza-type <type>  flavour of pizza
-h, --help               display help for command

How to use

Install the package

npm install {NAME} --save
# or
yarn add {NAME}

Import the package and use it

import {NAME} from '{NAME}'

render(
  <{NAME} 
    myProp={42}
  />
)

How to develop

  • yarn to install dependencies
  • yarn start to run in dev mode
  • yarn test to run tests
  • yarn lint to test and fix linter errors

To publish a new version, the publish pipeline can be manually invoked, or run yarn publish.

About

Typescript starter repo with eslint setup

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published