0.5.1 • Published 1 year ago

create-cap v0.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

cap

npm version GitHub Workflow Status Coverage Status node-current (scoped) GitHub

cap means create awesome project, it has some common engineering configurations built in. You can create a project with one line of command.

Usage

# npm
npm create cap my-cap-app
# yarn
yarn create cap my-cap-app
# pnpm
pnpm create cap my-cap-app

You can also directly specify the template:

# npm
npm create cap my-cap-app --template react-ts
# yarn
yarn create cap my-cap-app --template react-ts
# pnpm
pnpm create cap my-cap-app --template react-ts

Supported templates: ts, react-ts, vue-ts, svelte-ts, astro-ts

Common configurations

  • TypeScript
  • ESLint
  • Prettier
  • Husky
  • Lint-Staged
  • Vitest
  • Github Workflow

Templates

We have the following templates:

ts

Use tsup to build project using only TypeScript

react-ts

Use vite to build project using React18 and TypeScript

vue-ts

Use vite to build project using Vue3 and TypeScript

svelte-ts

Use vite to build project using Svelte3 and TypeScript

astro-ts

Project based on astro and TypeScript

Development

First run install

pnpm install

Link cli after build

pnpm build && pnpm --dir ./packages/create-cap link --global

Make changes, run build or watch mode

# run build
pnpm build-create

# run dev watch
pnpm dev-create

Run all test

pnpm test && pnpm test:template

Publish

latest

npm run publish --filter=<pkg>

beta

npm run publish:beta --filter=<pkg>

License

MIT