Skip to content

nnecec/repo-template

Repository files navigation

@n-kit/repo-template

Commitizen friendly Build status License

Features

  • Vite to develop, build.
  • ESLint to lint, Vitest to test.
  • commitizen, commitlint to limit commit messages.
  • @changesets/cli to generate changelog, manage versions, and publish.
  • use Husky to automatic trigger git hooks.
  • Use Docusaurus to write document, and web tests.
  • Base on yarn@berry to manage dependencies.

if you need monorepo, here is single monorepo-template

Get started

  1. Click Use this template, and clone your repo.
  2. Search @n-kit/repo-template, n-kit/repo-template, then replace all with your module name.

then it'll be your repository totally.

Tips

  1. Execute npm run changeset or yarn changeset to add a changeset, then execute git commit, this command will trigger lint-staged and commitzen.
  2. If you create a PR merge to main, changeset/actions will create a Version Packages PR. confirm merge Version Packages PR will trigger changeset publish, it's really publish.

Preset configs

  • .yarnrc.yml: npmRegistryServer: "https://registry.npm.taobao.org/"

  • commitlint.config.js: extends: ['@commitlint/config-conventional']

  • peerDependencies:

    "peerDependencies": {
      "react": "^18.0.0",
      "react-dom": "^18.0.0"
    },
  • tsconfig.json: "module": "esnext"

  • vite.config.ts: target: 'esnext'

Contributors

This project exists thanks to all the people who contribute.