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-05 17:26:58 -04:00
2018-02-28 17:07:53 -05:00
2018-06-07 11:28:10 -04:00
2018-06-08 00:52:45 -04:00
2018-06-08 00:51:12 -04:00
2018-01-06 13:04:43 -05:00
2018-06-05 14:50:04 -04:00
2018-06-10 13:59:43 +02:00

vue-cli Build Status Windows Build status

This is the branch for @vue/cli 3.0.

Status: beta

Most of the planned features are in place but there may still be bugs. API may still change until we reach RC phase. Do not use in production yet unless you are adventurous.

Documentation

Docs are available at https://cli.vuejs.org/ - we are still working on refining it and contributions are welcome!

Contributing

Please see contributing guide.

License

MIT

Description
🛠️ webpack-based tooling for Vue.js Development
Readme MIT 45 MiB
Languages
JavaScript 75%
Vue 22.9%
TypeScript 0.9%
Stylus 0.5%
HTML 0.3%
Other 0.4%