From f9ffb423679e83a2c0d9cce16800e58f5ed98409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 13 Mar 2020 15:22:19 +0800 Subject: [PATCH] fix cli error --- doric-cli/scripts/command.js | 4 ++++ doric-cli/scripts/watcher.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doric-cli/scripts/command.js b/doric-cli/scripts/command.js index 2da4018e..5d188e7f 100644 --- a/doric-cli/scripts/command.js +++ b/doric-cli/scripts/command.js @@ -27,6 +27,10 @@ function fromDir(startPath, filter) { }; function doMerge(startPath, fileName) { const filePath = fileName ? path.join(startPath, fileName) : startPath + if (filePath.indexOf('.es5.') >= 0){ + return + } + console.log('File change:', filePath) const mergedMap = SourceMapMerger.createMergedSourceMapFromFiles([ filePath.replace(/bundle\//, 'build/'), filePath, diff --git a/doric-cli/scripts/watcher.js b/doric-cli/scripts/watcher.js index 9970f8ef..fe6d6f24 100644 --- a/doric-cli/scripts/watcher.js +++ b/doric-cli/scripts/watcher.js @@ -19,7 +19,6 @@ setTimeout(() => { } fs.readFile(path, 'utf-8', (error, data) => { if (!path.endsWith('.map')) { - console.log('File change:', path) try { const sourceMap = doMerge(path + ".map") ws.connections.forEach(e => {