mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-20 11:30:43 -05:00
@@ -17,7 +17,7 @@ The version string for the **global** `@vue/cli` version that is invoking the pl
|
||||
While api.version can be useful in general, it's sometimes nice to just declare your version.
|
||||
This API exposes a simple way to do that.
|
||||
|
||||
Nothing happens if the provided version is satified. Otherwise, an error will be thrown.
|
||||
Nothing happens if the provided version is satisfied. Otherwise, an error will be thrown.
|
||||
|
||||
|
||||
## cliServiceVersion
|
||||
@@ -36,7 +36,7 @@ The version string for the **project local** `@vue/cli-service` version that is
|
||||
|
||||
This API exposes a simple way to declare the required project local `@vue/cli-service` version.
|
||||
|
||||
Nothing happens if the provided version is satified. Otherwise, an error will be thrown.
|
||||
Nothing happens if the provided version is satisfied. Otherwise, an error will be thrown.
|
||||
|
||||
|
||||
## resolve
|
||||
|
||||
@@ -17,7 +17,7 @@ The version string for the `@vue/cli-service` version that is loading the plugin
|
||||
While api.version can be useful in general, it's sometimes nice to just declare your version.
|
||||
This API exposes a simple way to do that.
|
||||
|
||||
Nothing happens if the provided version is satified. Otherwise, an error will be thrown.
|
||||
Nothing happens if the provided version is satisfied. Otherwise, an error will be thrown.
|
||||
|
||||
## getCwd
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@ This is because the command's expected mode needs to be known before loading env
|
||||
|
||||
Prompts are required to handle user choices when creating a new project or adding a new plugin to the existing one. All prompts logic is stored inside the `prompts.js` file. The prompts are presented using [inquirer](https://github.com/SBoudrias/Inquirer.js) under the hood.
|
||||
|
||||
When user initialize the plugin by calling `vue invoke`, if the plugin contains a `prompts.js` in its root directory, it will be used during invocation. The file should export an array of [Questions](https://github.com/SBoudrias/Inquirer.js#question) that will be handled by Inquirer.js.
|
||||
When user initialize the plugin by calling `vue invoke`, if the plugin contains a `prompts.js` in its root directory, it will be used during invocation. The file should export an array of [Questions](https://github.com/SBoudrias/Inquirer.js#question) that will be handled by Inquirer.js.
|
||||
|
||||
You should export directly array of questions, or export function that return those.
|
||||
|
||||
@@ -445,7 +445,7 @@ module.exports = [
|
||||
message: 'The locale of project localization.',
|
||||
validate: input => !!input,
|
||||
default: 'en'
|
||||
},
|
||||
},
|
||||
// ...
|
||||
]
|
||||
```
|
||||
@@ -466,7 +466,7 @@ module.exports = pkg => {
|
||||
}
|
||||
]
|
||||
|
||||
// add dynamically propmpt
|
||||
// add dynamically prompt
|
||||
if ('@vue/cli-plugin-eslint' in (pkg.devDependencies || {})) {
|
||||
prompts.push({
|
||||
type: 'confirm',
|
||||
|
||||
Reference in New Issue
Block a user