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

wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 897f4716 fix potential compatibility issue & update README.md
897f4716 is described below

commit 897f4716dc616f13bfda6cbaddbfdcad49ed3513
Author: plainheart <[email protected]>
AuthorDate: Mon Feb 26 12:12:40 2024 +0800

    fix potential compatibility issue & update README.md
---
 README.md               | 6 +++---
 tool/build-example.js   | 2 +-
 tool/compile-example.js | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 4727783e..ef992da1 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 ## Install
 
 ```shell
-npm install
+npm i --force
 ```
 
 ## Edit examples
@@ -51,7 +51,7 @@ For example:
 $.when(
   $.getScript(ROOT_PATH + '/data/asset/js/xxxx.js'),
   $.getScript(
-    'https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-contour.jXs'
+    'https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-contour.js'
   )
 ).done(function () {
   // ...
@@ -131,7 +131,7 @@ npm run build:examplelist
 If puppeteer has not been installed:
 
 ```shell
-npm i puppeteer
+npm i puppeteer -D
 ```
 
 If you want to save the log:
diff --git a/tool/build-example.js b/tool/build-example.js
index 656fde4e..1190095a 100644
--- a/tool/build-example.js
+++ b/tool/build-example.js
@@ -247,7 +247,7 @@ async function takeScreenshot(
       // ffmpeg.FS("unlink", `${basename}.webm`)
       // ffmpeg.FS("unlink", `${basename}.webp`)
       shell.exec(
-        `ffmpeg -y -i ${fileBase}.webm -s 
${OUTPUT_IMAGE_WIDTH}x${OUTPUT_IMAGE_HEIGHT} -f webp ${fileBase}.webp`
+        `ffmpeg -y -i "${fileBase}.webm" -s 
${OUTPUT_IMAGE_WIDTH}x${OUTPUT_IMAGE_HEIGHT} -f webp "${fileBase}.webp"`
       );
       try {
         fs.unlinkSync(webmFile);
diff --git a/tool/compile-example.js b/tool/compile-example.js
index 54296dd9..a367208e 100644
--- a/tool/compile-example.js
+++ b/tool/compile-example.js
@@ -7,9 +7,9 @@ const exampleDir = path.join(__dirname, '../public/examples');
 
 async function run() {
   const hasError =
-    shell.exec(`tsc --project ${path.join(exampleDir, 'tsconfig.json')}`)
+    shell.exec(`tsc --project "${path.join(exampleDir, 'tsconfig.json')}"`)
       .code !== 0;
-  shell.exec(`prettier --write ${path.join(exampleDir, 'js')}`);
+  shell.exec(`prettier --write "${path.join(exampleDir, 'js')}"`);
 
   const files = await globby('js/**/*.js', {
     cwd: exampleDir,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to