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 2020/02/16 21:28:09 UTC
[incubator-echarts] 07/09: tweak build and eslint
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 36cfe7773de5b6225debbedb9d174b938bd470a1
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Feb 17 01:32:48 2020 +0800
tweak build and eslint
---
build/build.js | 13 ++++++-------
src/.eslintrc.yaml | 6 ++----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/build/build.js b/build/build.js
index 1be3afd..12f3f82 100755
--- a/build/build.js
+++ b/build/build.js
@@ -392,7 +392,7 @@ var ensureZRenderCode = (function () {
&& fs.lstatSync(nodeModulesZr).isDirectory()
) {
console.log(chalk.blue(`rm -rf dir: ${nodeModulesZr}`));
- // ensure save.
+ // ensure save for rm -rf.
assert(nodeModulesZr.includes('node_modules') && nodeModulesZr.includes('zrender'));
fsExtra.removeSync(nodeModulesZr);
}
@@ -436,9 +436,10 @@ var ensureZRenderCode = (function () {
clear: function () {
// Calling guard
- assert(stats === 'prepared');
+ if (stats === 'cleared') {
+ return;
+ }
stats = 'cleared';
-
doClear();
}
}
@@ -450,11 +451,7 @@ async function main() {
await run();
}
catch (err) {
-
- ensureZRenderCode.clear();
-
console.log(chalk.red('BUILD ERROR!'));
-
// rollup parse error.
if (err) {
if (err.loc) {
@@ -472,6 +469,8 @@ async function main() {
err.plugin != null && console.warn(chalk.red(`plugin: ${err.plugin}`));
}
// console.log(err);
+
+ ensureZRenderCode.clear();
}
}
diff --git a/src/.eslintrc.yaml b/src/.eslintrc.yaml
index 76be321..136f443 100644
--- a/src/.eslintrc.yaml
+++ b/src/.eslintrc.yaml
@@ -1,7 +1,5 @@
-parserOptions:
- # If using ES Module, ecmaVersion have to be set as `2015`.
- ecmaVersion: 2015
- sourceType: "module"
+parser: "@typescript-eslint/parser"
+plugins: ["@typescript-eslint"]
env:
browser: true
node: true
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org