Configuration Parameters

@modern-js/create provides the --config parameter, which is used to specify the answers to interactive questions in advance during the execution process.

Here, we will introduce the fields and field values that can be configured in the config under different scenario.

General Configuration

solution

Question: Please select the type of project you want to create.

Options:

  • Web App -- mwa

  • Npm Module -- module

  • Doc Site -- doc

scenes

Question: Please select the project scenario.

Options:

List of plugin keywords when using custom generator plugins.

Web App

language

Question: Please select the programming language.

Options:

  • TS -- ts

  • ES6+ -- js

packageManager

Question: Please select the package manager.

Options:

  • pnpm -- pnpm

  • Yarn -- yarn

  • npm -- npm

Npm Module

packageName

Question: Please fill in the project name.

INFO

The value of the name field in the package.json file of the Npm module, which is a string type.

language

Question: Please select the programming language.

Options:

  • TS -- ts

  • ES6+ -- js

packageManager

Question: Please select the package manager.

Options:

  • pnpm -- pnpm

  • Yarn -- yarn

  • npm -- npm

Modern Doc

packageManager

Question: Please select the package manager.

Options:

  • pnpm -- pnpm

  • Yarn -- yarn

  • npm -- npm