Recently, I had to write a Vue3 project. Usually, I need to go to the Vite website and create the project from scratch. Add plugins like Vue-Router@4, Vuex or Pinia little by little, then configure quality management components like ESLint, Prettier, etc. Finally, if necessary, you’ll need to write Dockerfile and docker-comemage.yml to handle project packaging and deployment.
Fortunately, I have other projects to refer to in the past, so I can copy the previous configuration to save a little time. But what if I have no previous Vue3 project experience?
These initialization operations are actually repetitive, so I started with how to develop a Vue3- CLI project initializer and release it to NPM, and developed a cli tool to hand these tasks over to the program.
It is xmo-cli gitee.com/dXmo/xmo-cl… .
Antecedents feed
When can you use Xmo-CLI?
- 👉 is studying recently
Vue3
And it takes an open source project to really get you started. - 👉 want to
Vue3
The project adds a quality management configuration without knowing what to do about it. - 👉 want to
Vue3
Program to addDocker
Container configuration, but have no idea what to do about it. - 👉 is looking forward to using a Chinese version
Vue3-cli
Tool. - 👉 is happy to provide advice and Debug for open source projects and become
Contributors
A member of (the contributors).
Xmo – cli is introduced
Xmo-cli aims to be the best Vue3 starter and only focuses on Vue3 + Vite.
Function is introduced
- Supports creation of the latest
vue3.2
Project template. - The project template contains
mini
primary
full
ts-mini
ts-primary
ts-full
Multiple branches, from business functions to quality management to container operations and maintenance deployment. - for
Vue3 + Vite
The project provides support for adding quality management configurations; - for
Vue3 + Vite
The project provides support for adding Docker container configurations; (The development of) - Download popular open source projects (via image).
Why not?vue-cli
- The English language.
- Choice difficulty, the content of the options is complex and many options for beginners do not understand.
- not
vite
。 xmo-cli
Provides multi-branch templates, is a better starting learning tool.- Missing some very useful plugins.
- Does not provide
Docker
Examples of configuration. - Maintenance is a bit out of date.
The project address
Gitee address
Making the address
NPM address
Install the tutorial
npm install xmo-cli -g
Use the sample
For details, see the official readme.md document, which will be updated in real time.
📦 Create a project template
xmo-cli init [dir]
Copy the code
Download popular items at ⚓
xmo-cli create <dir>
Copy the code
⚙️ Add project management configuration
xmo-cli init -q
Copy the code
One-click add Docker configuration (including development configuration, packaging configuration and Nginx deployment configuration).The development of
In the project root directory
xmo-cli init -d
Copy the code
branch
The default recommended branch is TS /primary. (If you use xmo-cli init [dir] -y (add -y parameter), this branch will be initialized by default)
The mini – most Jane
Vue3 + VUE-Router + Pinia + Axios.
Degree of difficulty
Knowledge coverage coefficient ★★★
Having understood the branching code, I think I can cover **90%** of my development needs without touching on a specific UI framework.
Primary – usually
Vue3 + VUE-Router + Pinia + AXIos + mitt + Husky + ESLint + CommitLint + Commitizen
Degree of difficulty ★☆
Knowledge coverage coefficient ★★★★
Having understood this branching code, I think I can cover **99%** of my development and quality management configuration requirements without touching on a specific UI framework.
Full – complete
On the basis of primary,
Add Docker configuration, a more complete project practice guide, and take advantage of Docker’s one-click project deployment.
Difficulty factor ★★★
Knowledge coverage coefficient ★★★★☆
Having understood this branching code, I think I can cover **99.9% of ** development requirements and quality management configuration and deployment requirements without touching on a specific UI framework.
Typescript branch
Transform all original projects to typescript versions. For example, mini => TS-mini.
Initialize the project template example
Templates do not pay attention to detail and expect only one of the simplest scenarios to implement the sample business.
Mini
setup
Use the sample- Page adaptation example (use
display: grid
) - An example of sidebar adaptation
vue-router
Use the samplepinia
Use the sampleaxios
Use the sampleprettier
Configuration of the samplestyle
的v-bind
The sample
Primary
Mitt
The sampleeslint
+commitlint
+commitizen
+husky
+prettier
Project quality management example- Example of navigation bar jump
Typescript
Vue3
configurationtypescript
The sampleapi
+interface
A simple use example of the interface
Afterword.
So far the package and template have only been in development for a week, and the content may be rudimentary, and there may be bugs or missing features. It is for this reason that you are urgently required to use the project and provide feedback.
Of course, the most important functions are already available.
If you’re one of those people, give it a try.