Skip to content

Commit

Permalink
fix potential compatibility issue & update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Feb 26, 2024
1 parent 136a34a commit 897f471
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Install

```shell
npm install
npm i --force
```

## Edit examples
Expand Down Expand Up @@ -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 () {
// ...
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tool/build-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tool/compile-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 897f471

Please sign in to comment.