Skip to content

Commit

Permalink
Merge branch '2.x' of github.com:NervJS/taro into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Mar 6, 2020
2 parents a5e8a1b + 77e11cd commit 14d6bb6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/taro-cli/src/ui/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function copyFileToDist (filePath: string, sourceDir: string, outputDir:
}))
}

export function analyzeFiles (files: string[], sourceDir: string, outputDir: string, buildData: IBuildData) {
function _analyzeFiles(files: string[], sourceDir: string, outputDir: string, buildData: IBuildData){
files.forEach(file => {
if (fs.existsSync(file)) {
if (processedScriptFiles.has(file)) {
Expand Down Expand Up @@ -246,13 +246,17 @@ export function analyzeFiles (files: string[], sourceDir: string, outputDir: str
})
}
if (scriptFiles.length) {
analyzeFiles(scriptFiles, sourceDir, outputDir, buildData)
_analyzeFiles(scriptFiles, sourceDir, outputDir, buildData)
}
if (styleFiles.length) {
analyzeStyleFilesImport(styleFiles, sourceDir, outputDir, buildData)
}
}
})
}

export function analyzeFiles (files: string[], sourceDir: string, outputDir: string, buildData: IBuildData) {
_analyzeFiles(files, sourceDir, outputDir, buildData)
processedScriptFiles = new Set()
}

Expand Down

0 comments on commit 14d6bb6

Please sign in to comment.