A quick development tool based on the monorepo architecture, mainly includes packages such as @vswift/cli, @vswift/utils, and project template such as vue-admin.
- @vswift/cli - Quick development scaffolding, including framework initialization, dynamic generation of pages and components.
- @vswift/utils - Public methods, methods commonly used in business development.
- vue-admin - Admin template based on vue + vite.
pnpm install
pnpm dev:cli
The cli is the soul of the project. The command will monitor the modification of .ts files in the cli directory and compile in real time to generate the dist directory. If it is the first time to enter the project, it is necessary to execute pnpm dev:cli
to generate dist first, because the package.json configuration entry file of cli must be a compiled js file. If it is not the first development and the dist directory of cli has been generated, you can also execute pnpm dev -p cli
instead of pnpm dev:cli
.
pnpm dev --tpl vue-admin
--tpl can be abbreviated to -t .
- Run
pnpm build <-p, --pkg> <cli, utils>
command to build package. - Run
pnpm changeset
command and fill in the basic information. - Run
pnpm changeset version
command to generate changelog information (CHANGELOG.md). - Run
pnpm release <-p, --pkg> <cli, utils>
command to publish the selected package.
npm install -g @vswift/cli
Run vswift -v
command to check if @vswift/cli
is installed successfully.
vswift create
vswift gen <-p, --path> <json file path>
Used in conjunction with visual-development to convert configuration data into code.
Visual development through visual configuration, follow these steps:
- Run
vsiwft create
to get the initial framework of the project you need, currently only supports vue-admin. - Complete the visual configuration of the project here, or you can clone the visual-development and deploy it anywhere.
- The visual development platform generates json data through visual configuration, run
vswift gen <-p, --path> <json file path>
to convert configuration data into project code.