Files
vue-cli/docs
Guillaume Chau dbef5e9fed feat(ui): config improvements (#1487)
BREAKING CHANGES:

- The configuration API has changed.
- The `files` options now accept an object of different config files:

```js
api.describeConfig({
  /* ... */
  // All possible files for this config
  files: {
    // eslintrc.js
    eslint: {
      js: ['.eslintrc.js'],
      json: ['.eslintrc', '.eslintrc.json'],
      // Will read from `package.json`
      package: 'eslintConfig'
    },
    // vue.config.js
    vue: {
      js: ['vue.config.js']
    }
  },
})
```

- The `onWrite` api has changed: `setData` and `assignData` have now `fileId` as the first argument:

```js
api.describeConfig({
  onWrite: async ({ api, prompts }) => {
    const eslintData = {}
    const vueData = {}
    for (const prompt of prompts) {
      // eslintrc
      if (prompt.id.indexOf('vue/') === 0) {
        eslintData[`rules.${prompt.id}`] = await api.getAnswer(prompt.id, JSON.parse)
      } else {
        // vue.config.js
        vueData[prompt.id] = await api.getAnswer(prompt.id)
      }
    }
    api.setData('eslint', eslintData)
    api.setData('vue', vueData)
  }
})
```

Other changes

- Config tabs (optional):

```js
api.describeConfig({
  /* ... */
  onRead: ({ data, cwd }) => ({
    tabs: [
      {
        id: 'tab1',
        label: 'My tab',
        // Optional
        icon: 'application_settings',
        prompts: [
          // Prompt objects
        ]
      },
      {
        id: 'tab2',
        label: 'My other tab',
        prompts: [
          // Prompt objects
        ]
      }
    ]
  })
})
```
2018-06-10 14:01:45 +02:00
..
2018-06-07 15:39:34 -04:00
2018-06-08 00:11:46 -04:00
2018-06-09 11:03:49 -04:00
2018-06-07 13:24:59 -04:00

home, heroImage, actionText, actionLink, features, footer
home heroImage actionText actionLink features footer
true /logo.png Get Started → /guide/
title details
Feature Rich Out-of-the-box support for Babel, TypeScript, ESLint, PostCSS, PWA, Unit Testing & End-to-end Testing.
title details
Extensible The plugin system allows the community to build and share reusable solutions to common needs.
title details
No Need to Eject Vue CLI is fully configurable without the need for ejecting. This allows your project to stay up-to-date for the long run.
title details
GUI on top of the CLI Create, develop and manage your projects through an accompanying graphical user interface.
title details
Instant Prototyping Instantly prototype new ideas with a single Vue file.
title details
Future Ready Effortlessly ship native ES2015 code for modern browsers, or build your vue components as native web components.
MIT Licensed | Copyright © 2018-present Evan You

Getting Started

npm install -g @vue/cli
# OR
yarn global add @vue/cli

vue create my-project