You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2020/11/16 18:17:41 UTC

[incubator-echarts] 01/01: fix(build): fix some compatibility issues of build scripts in Windows.(#13628)

This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix/build-scripts
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit a7fc2f876da65d95db3d55810d8b593aef2d1298
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Tue Nov 17 02:16:43 2020 +0800

    fix(build): fix some compatibility issues of build scripts in Windows.(#13628)
---
 build/config.js      | 2 +-
 build/pre-publish.js | 8 ++++----
 build/release.js     | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/build/config.js b/build/config.js
index d0798c7..9cc6e82 100644
--- a/build/config.js
+++ b/build/config.js
@@ -37,7 +37,7 @@ function preparePlugins(
     // if (zrRealPath !== zrNodeModulePath) {
     //     include.push(zrRealPath + '/**/*.ts');
     // }
-    include.push(zrRealPath + '/**/*.ts');
+    include.push(zrRealPath + '/src/**/*.ts');
 
     if (clean) {
         console.log('Built in clean mode without cache.');
diff --git a/build/pre-publish.js b/build/pre-publish.js
index 6d19bda..ec60b31 100644
--- a/build/pre-publish.js
+++ b/build/pre-publish.js
@@ -311,10 +311,10 @@ function transformRootFolderInEntry(entryFile, replacement) {
  * Transform `zrender/src` to `zrender/esm` in all files
  */
 async function transformDistributionFiles(rooltFolder, replacement) {
-    const files = await globby([
-        rooltFolder + '/**/*.js',
-        rooltFolder + '/**/*.d.ts',
-    ]);
+    const files = await readFilePaths({
+        patterns: ['**/*.js', '**/*.d.ts'],
+        cwd: rooltFolder
+    });
     // Simple regex replacement
     // TODO More robust way?
     for (let fileName of files) {
diff --git a/build/release.js b/build/release.js
index a198503..2a4e070 100644
--- a/build/release.js
+++ b/build/release.js
@@ -19,7 +19,7 @@
 * under the License.
 */
 
-const {spawn} = require('child_process');
+const spawn = require('cross-spawn');
 const path = require('path');
 const chalk = require('chalk');
 const fsExtra = require('fs-extra');
@@ -78,4 +78,4 @@ function release() {
     });
 }
 
-release();
\ No newline at end of file
+release();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org