Skip to content
/ cli-template Public template

Start developing a CLI package and built a binary with node sea without any configuration.

Notifications You must be signed in to change notification settings

moontaiworks/cli-template

Repository files navigation

@moontaiworks/cli-template

Intro

This is an out-of-box TypeScript-based project template with the following features:

Ideal for maintaining high-quality, well-documented, and automated TypeScript projects.

Getting Started

1. Use this template to create a new repository.

Click the Use this template button on the top right corner of the repository page.

2. Clone the repository, and install the dependencies.

Just clone your repo and install the dependencies with any package manager you like. This template does not strong bind to any package manager, but the used package manager in GitHub Actions workflow is pnpm. You may need to modify the workflow file if you use other package managers.

3. Modify the package content to fit your project.

There are a few places you need to modify to fit your project.

First, set the project name in package.json and README.md. You can use the following command to replace it and initialize the project:

YOUR_GITHUB_USER="your-user-name"
YOUR_REPO_NAME="your-awesome-repo-name"
sed -i "s/moontaiworks/${YOUR_GITHUB_USER}/g" package.json README.md CONTRIGUTING.md .github/workflows/*
sed -i "s/cli[-_]template/${YOUR_REPO_NAME}/g" package.json README.md CONTRIGUTING.md .github/workflows/*

4. Start coding!

You can now start coding! Simple right?

You can also checkout the Contributing Guide to learn more.

5. Publish

This template uses CodeCov to archive the code coverage. If you want to use CodeCov, you need to set the CODECOV_TOKEN in the repository secrets. If you don't need to use CodeCov, you can remove the CodeCov badge and the related scripts in package.json and .github/workflows/publish.yml.

Once you done your first version, you can open pull request or directly push your codes to the main branch.

The actions in this template will auto perform following steps when you push the code to the main branch:

  • Test: Run tests and generate coverage report.
  • Build: Generate bundled and minified esm, cjs and iife version, and unminified esm version for node.
  • Release: Bump Version & Generate Changelog.
  • Publish the package to npm

You can modify the workflow file to fit your needs.

Before start developing, you should remove all desciptions above this line.


NPM Version NPM Downloads Codecov

Usage

npx @moontaiworks/cli-template

About

Start developing a CLI package and built a binary with node sea without any configuration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published