Starters collection based on pnpm workspace.
Note: This is a personal project, it is NOT community oriented, so the direction of the iteration will be entirely based on the authors' own opinions.
- Use this template and clone it.
- Do not run
pnpm install
immediately, runpnpm init:workspace
to only install dependencies required by CLI. - Pick starters you need for this time.
- Move on!
Also, you can use degit
to clone internal workspace packages directly:
pnpx degit https://github.com/LinbuduLab/starter-collections/packages/cac-cli-starter ./my-awesome-cli
pnpx degit https://github.com/LinbuduLab/starter-collections/packages/<package> <dir>
- NestJs + GraphQL
- Mercurius
- Nest + Mercurius
- Strapi(with GraphQL)
- MidwayJs + GraphQL
- Apollo Element
- Apollo Client
- Apollo Server
- Envelop Plugin Starter
- GraphQL Code Generator
- ESBuild Plugin Starter
- Vite Plugin Starter
- TypeScript Tool Type
- Common Node Library
- Prisma Starter
- CLI App by CAC
- GitHub Action
- Puppeteer
Command: pnpm cli init
As pnpm's postinstall hook cannot be interactive, we need to run:
pnpm cli init
manually to init workspace.
In fact, all we need to do is to choose some of these projects according to our actual needs.
? Choose starters you want to use for this time! …
✔ cra-ts
✔ esbuild-plugin-starter
✔ esbuild-react-app
✔ midway-koa
✔ nest-graphql-starter
✔ nest-starter
✔ parcel-react
✔ prisma-starter
...
Projects that are not selected will be removed from the workspace packages dir /packages
and a backup will be kept in node_modules/.LinbuduLab
.
- You can run
pnpm cli reset
to recover these packages back topackages
dir. - You can use command
pnpm cli copy
to add specified packages back. - You can execute
pnpm cli cache
to cache workspace packages manually.
✔ Choose starters you want to copy into workspace · esbuild-plugin-starter, esbuild-react-app
✔ Rename package esbuild-plugin-starter · esbuild-plugin-boom
? Rename package esbuild-react-app › esbuild-react-todo
Command: pnpm cli reset
This command recovers all the original packages, and does not overwrite the already existing projects.
Useful when you want to start from scratch.
Command: pnpm cli copy
This command can be useful when you want to have multiple projects based on the same initial template(starter), for example you may want to develop several ESBuild plugins inside one workspace.
After you have selected the items you want to copy, you also need to rename them, which will be used to update name
field in package.json
.
✔ Choose starters you want to copy into workspace · esbuild-plugin-starter, esbuild-react-app
✔ Rename package esbuild-plugin-starter · esbuild-plugin-boom
? Rename package esbuild-react-app › esbuild-react-todo
Command: pnpm cli rename
Select starters and rename them(dir and package.json
name field).
Useful when you want to rename some packages to be actually used.
Command: pnpm cli cache
Cache all initial workspacr packages to cache dir. This will be executed in postinstall
hook.
You can also execute command manually to cache some extra changes.
Command: pnpm cli create
This command creates a simple TypeScript starter with minimal essential scripts for you.
Command: pnpm cli fork [workspace name] <forked worksapce dir>
.
This command will create a fork of the current workspace at specified directory. If destination directory is not specified, it will use ../tmp/forked
as default.
Command: pnpm cli upgrade [projectBlurKeyword]
This command executes deps version checking and upgrading for specified packages. You can use just keyword or complete project name like:
# input 'vite' has no '-' signal, so it will work for all projects which has 'vite' in its name
pnpm cli u vite
# work for 'vite-react-starter' only
pnpm cli u vite-react-starter
Also, if you execute this command with no project name (or no exist project name), it will ask you for working targets.
WIP
Command: pnpm cli release [project] --minor --skip-git-checks --changelog
pnpm-vscode-helper: VS Code Extension for pnpm, pnpm workspace and more.
In such workspaces, which contain a large number of packages, you can use this extension to greatly improve productivity, including auto-completion, workspace package navigation, and intuitive use of the powerful pnpm filtering syntax.
This project follows MIT License.