Skip to content

Commit

Permalink
fix: 修复h5模式watch功能的一个手抖
Browse files Browse the repository at this point in the history
  • Loading branch information
Littly committed May 4, 2018
1 parent 6081999 commit 86fbebd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/taro-cli/src/h5.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ function classifyFiles (filename) {

function watchFiles () {
console.log(chalk.gray('\n监听文件修改中...\n'))
// isBuildingScripts = {}
// isBuildingStyles = {}
// isCopyingFiles = {}
const watcher = chokidar.watch(path.join(sourceDir), {
ignored: /(^|[/\\])\../,
persistent: true,
Expand Down Expand Up @@ -442,11 +439,9 @@ function watchFiles () {
fs.writeFileSync(filePath.replace(sourceDir, tempDir), transformResult.code)
} else {
// 其他
vfs.src([modifySource]).pipe(vfs.dest(tempPath))
const destDir = path.dirname(filePath.replace(sourceDir, tempDir))
vfs.src([modifySource]).pipe(vfs.dest(destDir))
}
// isBuildingScripts = {}
// isBuildingStyles = {}
// isCopyingFiles = {}
})
}

Expand Down

0 comments on commit 86fbebd

Please sign in to comment.