You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2018/05/07 17:55:04 UTC

[incubator-echarts] 01/02: tweak build tool.

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

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit d65624f8ca9b6ec49bb105c8c4b5117fc47ff42c
Author: sushuang <su...@gmail.com>
AuthorDate: Tue May 8 01:46:38 2018 +0800

    tweak build tool.
---
 build/addHeader.js   | 48 ++++++++++++++++++++++++++++++++----------------
 build/pre-publish.js |  6 ++++--
 2 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/build/addHeader.js b/build/addHeader.js
index 59f3b21..747f3ec 100644
--- a/build/addHeader.js
+++ b/build/addHeader.js
@@ -31,6 +31,8 @@ const {color} = require('zrender/build/helper');
 const excludesPath = pathTool.join(__dirname, '../.rat-excludes');
 const ecBasePath = pathTool.join(__dirname, '../');
 
+const isVerbose = process.argv[2] === '--verbose';
+
 // const lists = [
 //     '../src/**/*.js',
 //     '../build/*.js',
@@ -81,37 +83,51 @@ function run() {
         updatedFiles.push(absolutePath);
     });
 
+    console.log('\n');
+    console.log('----------------------------');
+    console.log(' Files that exists license: ');
+    console.log('----------------------------');
     if (passFiles.length) {
-        console.log('\n\n');
-        console.log('----------------------------');
-        console.log(' Files that exists license: ');
-        console.log('----------------------------');
-        passFiles.forEach(function (path) {
-            console.log(color('fgGreen', 'dim')(path));
-        });
+        if (isVerbose) {
+            passFiles.forEach(function (path) {
+                console.log(color('fgGreen', 'dim')(path));
+            });
+        }
+        else {
+            console.log(color('fgGreen', 'dim')(passFiles.length + ' files. (use argument "--verbose" see details)'));
+        }
+    }
+    else {
+        console.log('Nothing.');
     }
 
+    console.log('\n');
+    console.log('--------------------');
+    console.log(' License added for: ');
+    console.log('--------------------');
     if (updatedFiles.length) {
-        console.log('\n\n');
-        console.log('--------------------');
-        console.log(' License added for: ');
-        console.log('--------------------');
         updatedFiles.forEach(function (path) {
             console.log(color('fgGreen', 'bright')(path));
         });
     }
+    else {
+        console.log('Nothing.');
+    }
 
+    console.log('\n');
+    console.log('----------------');
+    console.log(' Pending files: ');
+    console.log('----------------');
     if (pendingFiles.length) {
-        console.log('\n\n');
-        console.log('----------------');
-        console.log(' Pending files: ');
-        console.log('----------------');
         pendingFiles.forEach(function (path) {
             console.log(color('fgRed', 'dim')(path));
         });
     }
+    else {
+        console.log('Nothing.');
+    }
 
-    console.log('\n Done.');
+    console.log('\nDone.');
 }
 
 function eachFile(visit) {
diff --git a/build/pre-publish.js b/build/pre-publish.js
index 5a4953e..3b87cdb 100644
--- a/build/pre-publish.js
+++ b/build/pre-publish.js
@@ -45,7 +45,8 @@ module.exports = function () {
         prePulishSrc({
             inputPath: absolutePath,
             outputPath: path.resolve(libDir, relativePath, fileName),
-            transform
+            transform: transform,
+            preamble: preamble.js
         });
     });
 
@@ -53,7 +54,8 @@ module.exports = function () {
         prePulishSrc({
             inputPath: absolutePath,
             outputPath: path.resolve(extensionDir, relativePath, fileName),
-            transform
+            transform: transform,
+            preamble: preamble.js
         });
     });
 

-- 
To stop receiving notification emails like this one, please contact
sushuang@apache.org.

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