Skip to content

Commit

Permalink
Add preinstall script to install local sample viewer renderer package
Browse files Browse the repository at this point in the history
  • Loading branch information
UX3D-haertl committed Jul 11, 2024
1 parent df4a767 commit 4fdfedb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,15 @@ Debugging
* Install the [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) or [Debugger for Firefox](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-firefox-debug) extension for Visual Studio Code
* Open the project directory in Visual Studio Code and select `Debug->Add Configuration->Chrome` or `Debug->Add Configuration->Firefox` so the `.vscode/launch.json` file is created.
* Append `/app_web/dist` to `${workspaceFolder}` in the `launch.json` file
* `Debug->Start Debugging` should now launch a Chrome or Firefox window with the sample viewer and VS Code breakpoints should be hit.
* `Debug->Start Debugging` should now launch a Chrome or Firefox window with the sample viewer and VS Code breakpoints should be hit.

### Known Issues
npm install give the following warning:
```
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
```
These warnings come from rollup plugins copy and sourcemaps, both are dev dependencies and not used in the final distribution.\
Sourcemap is used to make debugging of @khronosgroup/gltf-viewer possible.\
Copy is used to copy all required files to dist.
1 change: 1 addition & 0 deletions app_web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app_web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "src/main.js",
"type": "module",
"scripts": {
"preinstall": "cd .. && npm install && npm run build",
"build": "rollup -c",
"dev": "concurrently \"npm run --prefix .. watch\" \"npm-watch\" \"serve --listen 8000 dist\"",
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down

0 comments on commit 4fdfedb

Please sign in to comment.