Clean and minimalist project scaffolding integratesvue3 project templates,vitepress project templates, etc., right out of the box.
Compatibility note: The scaffolding uses
Viteinternally by default,ViterequiresNode.jsversion14.18+,16+. However, some templates rely on a higher version ofNodeto function properly, so be careful to upgrade your version of 'Node' when your package manager warns you. node version switch
No sense download template, no need to install @yaoxfly/cli.
npx @yaoxfly/cli@latest create [Project name]
If the
npmimage downloads slowly, please switch other image such astaobaoimage, you can usenrmmanagement, or other ways, image switch.
You can also download and then use, the current way can provide more comprehensive features, global download.
npm i @yaoxfly/cli -g
use
yx-cli create [Project name]
Add custom templates, such as your own GitHub or Gitee (code cloud) project address
yx-cli add
You can use the following shorthand
GitHub - github:owner/name or owner/name
GitLab - gitlab:owner/name
Bitbucket - bitbucket:owner/name
1.The default is
masterbranching, but you can specify branching andtag, such asowner/name#my-branch. 2.You can also specify a custom source, such asgitlab:custom.com: owner/name. Custom source default ishttpsorgit@, you can customize the protocol.
This method skips the above shorthand and passes the full url.
direct:https://gitlab.com/flippidippi/download-git-repo-fixture.git
Gitee(code cloud), private library address can be used in this way.
yx-cli delete
yx-cli list
Global download
npm i nrm@1.0.0 -g
A lower version of
nodeand a higher version ofnrmmay not be available.
Viewing the image list
nrm ls
Using Taobao image
nrm use taobao
Set Taobao image
npm config set registry https://registry.npmmirror.com/
registry.npm.taobao.org, which was abandoned on May 31, 2022, needs to be replaced with a newregistry.npmmirror.comsource.
Check whether the configuration is successful
npm config get registry
View the current configuration of npm
npm config list
Set up an npm image
npm config set registry https://registry.npmjs.org/
In the root directory, create .npmrc and write the following
registry= https://registry.npmmirror.com/
Download the vmm-setup. zip version and install it as prompted.
This describes only windows systems.
When node is installed using the nvm command line, nvm will not install npm when the node version is 8or higher.
Download the corresponding version zip file from the nodejs download website and decompress it to the root directory of the nvm installation directory. Change the name of the decompressed folder to v version number
For example, the folder name after decompression is changed from node-v16.13.1-win-x64 to v16.13.1.
View the downloaded version of node
nvm list
Use the corresponding version
nvm use [Version number]