fix: fix typo in typescript generator, convertAllFiles -> convertJsToTs (#4346)

fixes https://github.com/vuejs/vue-cli/issues/2676#issuecomment-514163315

(cherry picked from commit 8b7af389d1)
This commit is contained in:
Haoqun Jiang
2019-07-25 09:55:34 +08:00
parent 66c410b31a
commit 878c337feb

View File

@@ -1,9 +1,9 @@
module.exports = (api, { tsLint = false, convertAllFiles = true } = {}) => {
module.exports = (api, { tsLint = false, convertJsToTs = true } = {}) => {
const jsRE = /\.js$/
const excludeRE = /^tests\/e2e\/|(\.config|rc)\.js$/
const convertLintFlags = require('../lib/convertLintFlags')
api.postProcessFiles(files => {
if (convertAllFiles) {
if (convertJsToTs) {
// delete all js files that have a ts file of the same name
// and simply rename other js files to ts
for (const file in files) {