Skip to content

Commit

Permalink
improve js build doc (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Mar 26, 2021
1 parent 757e992 commit 2f69b57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webiojs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

```bash
npm install
DEV=1 gulp
gulp

This comment has been minimized.

Copy link
@frafra

frafra Mar 26, 2021

I would suggest to use npx gulp

This comment has been minimized.

Copy link
@wang0618

wang0618 Mar 26, 2021

Author Member

OK, I'll look into the differences of the two (I'm not particularly familiar with nodejs).

This comment has been minimized.

Copy link
@frafra

frafra Mar 26, 2021

npx is built in npm and it is meant to run commands. This helps the user running gulp even if the PATH environment variable does not include the bin directory inside the node_modules that has been created by npm install.

This comment has been minimized.

Copy link
@wang0618

wang0618 Mar 26, 2021

Author Member

Got it

```

## Use built js

```bash
cp dist/pywebio.min.* ../pywebio/html/js
```
```

By default, PyWebIO uses CDN for frontend resources. For local dev build, you also need to set `cdn=False` in `start_server()` or `webio_handler()` in your PyWebIO app to specify the use of the local built js file.

0 comments on commit 2f69b57

Please sign in to comment.