Skip to content

Commit 96e1a67

Browse files
committed
fix(generator): warn about vue router if not using ts
before, it would only warn if the app used ts
1 parent 846506e commit 96e1a67

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

generator/index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ module.exports = (api, options = {}) => {
7272
'let win: BrowserWindow | null'
7373
)
7474
fs.writeFileSync(api.resolve('./src/background.ts'), background)
75-
if (api.hasPlugin('router')) {
76-
console.log('\n')
77-
require('@vue/cli-shared-utils/lib/logger').warn(
78-
'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at https://goo.gl/GM1xZG .'
79-
)
80-
}
75+
}
76+
if (api.hasPlugin('router')) {
77+
console.log('\n')
78+
require('@vue/cli-shared-utils/lib/logger').warn(
79+
'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at https://goo.gl/GM1xZG .'
80+
)
8181
}
8282
})
8383

@@ -112,7 +112,8 @@ module.exports = (api, options = {}) => {
112112
const dependencies = {}
113113
if (testFramework) {
114114
// Spectron version should be electron version + 2
115-
devDependencies.spectron = '^' + (parseInt(electronVersion.match(/^\^(\d*)\./)[1]) + 2) + '.0.0'
115+
devDependencies.spectron =
116+
'^' + (parseInt(electronVersion.match(/^\^(\d*)\./)[1]) + 2) + '.0.0'
116117
}
117118
if (testFramework === 'mocha') {
118119
dependencies['chai-as-promised'] = '^7.1.1'

0 commit comments

Comments
 (0)