Skip to content

Commit

Permalink
fix(pwa): wrong config, closes #1890
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jul 20, 2018
1 parent a352bdc commit f4aa40d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/@vue/cli-plugin-eslint/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ module.exports = api => {
label: 'org.vue.eslint.suggestions.open-eslintrc.label',
handler () {
const file = config.foundFiles.eslint.path
console.log('open', file)
const launch = require('launch-editor')
launch(file)
return {
Expand Down
8 changes: 3 additions & 5 deletions packages/@vue/cli-plugin-pwa/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@ module.exports = api => {
onWrite: async ({ api, prompts, cwd }) => {
const result = {}
for (const prompt of prompts.filter(p => !p.raw.skipSave)) {
result[`org.vue.pwa.${prompt.id}`] = await api.getAnswer(prompt.id)
result[`pwa.${prompt.id}`] = await api.getAnswer(prompt.id)
}
api.setData('vue', result)

// Update app manifest

const name = result['org.vue.pwa.name']
const name = result['name']
if (name) {
api.setData('manifest', {
name,
short_name: name
})
}

const themeColor = result['org.vue.pwa.themeColor']
const themeColor = result['themeColor']
if (themeColor) {
api.setData('manifest', {
theme_color: themeColor
Expand Down Expand Up @@ -131,7 +131,6 @@ module.exports = api => {
label: 'org.vue.pwa.suggestions.open-vue.label',
handler () {
const file = config.foundFiles.vue.path
console.log('open', file)
const launch = require('launch-editor')
launch(file)
return {
Expand All @@ -149,7 +148,6 @@ module.exports = api => {
label: 'org.vue.pwa.suggestions.open-manifest.label',
handler () {
const file = config.foundFiles.manifest.path
console.log('open', file)
const launch = require('launch-editor')
launch(file)
return {
Expand Down

0 comments on commit f4aa40d

Please sign in to comment.