hkust-cli
v0.1.1
Published
CLI to scaffold Vue2/Vue3/React projects from local templates
Readme
hkust-cli
A simple CLI to scaffold Vue2/Vue3/React projects from local templates.
Install & Usage
You can run it directly with npx:
npx hkust-cli <project-name>You'll be prompted to choose one of the templates: vue2, vue3, or react.
Alternatively, specify the template without prompt:
npx hkust-cli <project-name> --template vue2
npx hkust-cli <project-name> -t vue3
npx hkust-cli <project-name> -t reactBy default, the CLI uses built-in templates under this package:
<package-root>/templatesBuilt-in template directories:
<package-root>/templates/vue2<package-root>/templates/vue3<package-root>/templates/react
You can override the templates root by setting an environment variable:
export HKUST_TEMPLATES_ROOT=/path/to/your/templatesWhat it does
- Interactively selects a template or uses
--template. - Copies the template into a new directory named
<project-name>. - Excludes
node_modules,dist,.gitfolders from copying. - Updates the
package.jsonnamefield in the new project.
Next steps after scaffolding
cd <project-name>
npm install
npm run devPublish to npm
This package is configured for npm publish. From the hkust-cli directory:
npm login
npm publish --access publicLicense
MIT
