From d104655219f37223f6de3cab285bc2ab1d1d05ad Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 7 Nov 2022 17:09:42 +0800 Subject: [PATCH 1/6] chore: start a local server for testing when run dev #17868 --- README.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c98532b32..28deee8436 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ Execute the instructions in the root directory of the echarts: npm install # Rebuild source code immediately in watch mode when changing the source code. +# It will start a server with './test' at http://127.0.0.1:8080. +# Open http://127.0.0.1:8080/-cases.html to view the list of test cases. npm run dev # Check correctness of TypeScript code. diff --git a/package.json b/package.json index 0e7ea3f844..0fbacd4cbd 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:lib": "node build/build.js --prepublish", "build:extension": "node build/build.js --type extension", "dev:fast": "node build/build-i18n.js && node build/dev-fast.js", - "dev": "npm run dev:fast", + "dev": "npx http-server -- test & npm run dev:fast", "prepublish": "npm run build:lib", "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension", "help": "node build/build.js --help", From eaee25399286f3aa82bea9aa8345101c1d11a5e4 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Tue, 8 Nov 2022 11:12:51 +0800 Subject: [PATCH 2/6] chore: update dev script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fbacd4cbd..3c2a48322e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:lib": "node build/build.js --prepublish", "build:extension": "node build/build.js --type extension", "dev:fast": "node build/build-i18n.js && node build/dev-fast.js", - "dev": "npx http-server -- test & npm run dev:fast", + "dev": "npx concurrently -n build,server \"npm run dev:fast\" \"npx http-server -c-1 -s -o test\"", "prepublish": "npm run build:lib", "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension", "help": "node build/build.js --help", From d6b9b4f0b0c67113edc0723fa983804d217cb2e6 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Tue, 8 Nov 2022 11:44:18 +0800 Subject: [PATCH 3/6] chore: run npx without prompt installation --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3c2a48322e..f658d4e75a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:lib": "node build/build.js --prepublish", "build:extension": "node build/build.js --type extension", "dev:fast": "node build/build-i18n.js && node build/dev-fast.js", - "dev": "npx concurrently -n build,server \"npm run dev:fast\" \"npx http-server -c-1 -s -o test\"", + "dev": "npx -y concurrently -n build,server \"npm run dev:fast\" \"npx http-server -c-1 -s -o test\"", "prepublish": "npm run build:lib", "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension", "help": "node build/build.js --help", From 985903bb5aca6c4e271507f177dc892b3b994dfe Mon Sep 17 00:00:00 2001 From: Ovilia Date: Tue, 8 Nov 2022 11:45:46 +0800 Subject: [PATCH 4/6] chore: run npx without prompt installation --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f658d4e75a..3bc3365d82 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:lib": "node build/build.js --prepublish", "build:extension": "node build/build.js --type extension", "dev:fast": "node build/build-i18n.js && node build/dev-fast.js", - "dev": "npx -y concurrently -n build,server \"npm run dev:fast\" \"npx http-server -c-1 -s -o test\"", + "dev": "npx -y concurrently -n build,server \"npm run dev:fast\" \"npx -y http-server -c-1 -s -o test\"", "prepublish": "npm run build:lib", "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension", "help": "node build/build.js --help", From 38d6354e088cd85e015093840bb33fe6522c0423 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Tue, 8 Nov 2022 12:00:36 +0800 Subject: [PATCH 5/6] chore: update readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28deee8436..a5a9aa938a 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,9 @@ Execute the instructions in the root directory of the echarts: npm install # Rebuild source code immediately in watch mode when changing the source code. -# It will start a server with './test' at http://127.0.0.1:8080. -# Open http://127.0.0.1:8080/-cases.html to view the list of test cases. +# It opens the `./test` directory and you may open `-cases.html` to get the list +# of all test cases. +# If you wish to create a new test case, run `npm run mktest` to learn more. npm run dev # Check correctness of TypeScript code. From dc35df70f990590af2fccbfe2d108fac2bf00cef Mon Sep 17 00:00:00 2001 From: Ovilia Date: Tue, 8 Nov 2022 12:04:17 +0800 Subject: [PATCH 6/6] chore: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a5a9aa938a..78472efa78 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ npm install # Rebuild source code immediately in watch mode when changing the source code. # It opens the `./test` directory and you may open `-cases.html` to get the list # of all test cases. -# If you wish to create a new test case, run `npm run mktest` to learn more. +# If you wish to create a test case, run `npm run mktest:help` to learn more. npm run dev # Check correctness of TypeScript code.