Skip to content

Commit

Permalink
Make start do both watch and server
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 23, 2023
1 parent 25b8b65 commit d19effc
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 9 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,12 @@ import { createTextureFromImage } from 'webgpu-utils';
```
git clone https://github.com/greggman/webgpu-utils.git
cd webgpu-utils
npm install
npm ci
npm start
```

This will run rollup in watch mode, building from typescript into
`dist/1.x/webgpu-utils.js`.

```
npx servez
```
`dist/1.x/webgpu-utils.js` and start a server

Now open [`http://localhost:8080/test/`](http://localhost:8080/test/) to run tests.

Expand Down
16 changes: 16 additions & 0 deletions build/tools/serve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {spawn} from 'child_process';

spawn('npm', [
'run',
'watch',
], {
shell: true,
stdio: 'inherit',
});

spawn('./node_modules/.bin/servez', [
], {
shell: true,
stdio: 'inherit',
});

Loading

0 comments on commit d19effc

Please sign in to comment.