Commit Graph

21 Commits

Author SHA1 Message Date
Guillaume Chau
6c4ebb00b5 fix(ui): folder loading indicator + e2e tests 2018-06-17 03:14:27 +02:00
Guillaume Chau
60722cb1f0 test(ui): fix e2e 2018-06-15 21:28:08 +02:00
Guillaume Chau
a13595cf14 test(ui): fix e2e 2018-06-14 23:21:22 +02:00
Guillaume Chau
2b12c81998 test(ui): fix e2e 2018-06-10 17:16:39 +02:00
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
Guillaume Chau
f42632bee4 feat(ui): Display cli-service in plugins view (so it can be upgraded) (#1422)
* feat(ui): display cli-service in plugins view (so it can be upgraded)

* test: fix plugins list

* fix(ui): mark cli-service as official
2018-06-05 10:59:02 +02:00
Evan You
c35eba2047 test: fix ui tests 2018-05-29 00:50:17 -04:00
Guillaume Chau
21a34211c7 test: fix 2018-05-23 15:16:44 +02:00
Guillaume Chau
53280dde3a test: tasks 2018-05-20 21:57:29 +02:00
Guillaume Chau
8e213dd85c test: config list 2018-05-20 21:42:08 +02:00
Guillaume Chau
c0ab9e63eb test: refactoring files 2018-05-20 13:59:14 +02:00
Guillaume Chau
c01dc089bb test: fix plugin install: command timeout 2018-05-20 13:21:43 +02:00
Guillaume Chau
a18933227a test: plugins 2018-05-20 13:07:46 +02:00
Guillaume Chau
71bc8a580e test(ui): use data-testid 2018-05-19 04:15:44 +02:00
Guillaume Chau
3c4f206706 test: change timeouts 2018-05-19 00:46:26 +02:00
Guillaume Chau
826d72e85b test(ui): decrease timeout 2018-05-12 15:20:05 +02:00
Guillaume Chau
bec2b5ee94 test(ui): increase project create timeout 2018-05-12 13:55:17 +02:00
Guillaume Chau
7bdf84f037 test(ui): fix linter enabled by default 2018-05-12 04:54:50 +02:00
Guillaume Chau
a065719f61 test(ui): increase timeout 2018-05-12 04:53:09 +02:00
Guillaume Chau
caf3c248db test(ui): tests in production mode 2018-05-12 04:27:47 +02:00
Guillaume Chau
1b7b5f8816 test(ui): e2e: cypress added + create project (manual) test 2018-05-12 03:56:03 +02:00