-
Notifications
You must be signed in to change notification settings - Fork 10
Features
- Create Project
- CLI Config
- Other
Creating projects via boilerplate
is still the main feature of this tool, but unlike v0.x
, the new version will support three different ways of creating:
- Package
- HTTP
- Git
The first concept introduced is boilerplate-package
, which is an npm package
for wrapping boilerplate
, which looks roughly like this:
boilerplate-package
βββ boilerplate/ # real boilerplate
βββ vrn-boilerplate.json # the boilerplate description and configuration file
βββ index.js # install script
A boilerplate-package
is responsible for managing its own boilerplate
separately, and can provide it with some unique and custom installation options and procedures (via hooks)
Afterwards, a manifest-package
collects information about all available boilerplate-packages
.
See the vrn-boilerplate repository for more details here, it should probably be under the next branch now, but I believe it will be back in the mainline soon
Now we go back to cli
and in package
mode, first we inspect and install the latest version of manifest-package
via dynamic dependency management, get all available boilerplate-package
information from manifest-package
, then install the user-selected boilerplate-package
, and finally start the install script on boilerplate-package
to complete the creation
This is similar to the v0.x
installation, in http
mode, first we request all available boilerplate
information from the specified manifest-url
, then download the specified zip package (.tgz
or .zip
) according to the boilerplate
selected by the user, unzip it and finish the creation
The git
mode provides a git clone
installation that clones from a user-specified Git repository and completes the creation
This mode supports favorites, where you can set an alias for your Git repository and use it to create it next time
Unlike the previous two modes, the
git
mode does not support creating packages under Monorepo
config
is used to manage the global configuration of cli
, through which the user can interactively view and edit the settings
-
packageManager
: the package manager to use, default isnpm
, optionalnpm | yarn | pnpm
-
npmRegistry
: thenpm
source to use, default istaobao
source, built-innpm
andtaobao
, customizable -
checkUpdateEnabled
: if or not the version update check is enabled, default is enabled, check period is one day