mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-14 13:11:10 -05:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user