|
|
@ -1,6 +1,6 @@ |
|
|
|
# ng-app-js |
|
|
|
# ng-sdk-js |
|
|
|
|
|
|
|
|
|
|
|
JS/WASM module of NextGraph (SDK and apps) |
|
|
|
JS/WASM crate containing the SDK of NextGraph |
|
|
|
|
|
|
|
|
|
|
|
## NextGraph |
|
|
|
## NextGraph |
|
|
|
|
|
|
|
|
|
|
@ -12,13 +12,13 @@ JS/WASM module of NextGraph (SDK and apps) |
|
|
|
|
|
|
|
|
|
|
|
## JS/WASM module |
|
|
|
## JS/WASM module |
|
|
|
|
|
|
|
|
|
|
|
This module is part of the SDK of NextGraph. |
|
|
|
This crate is composed of |
|
|
|
|
|
|
|
|
|
|
|
It is composed of |
|
|
|
- the npm package `ng-app-js` which is the SDK |
|
|
|
- the npm package `ng-app-js` which is the SDK |
|
|
|
- an example of web app using the ESmodule and webpack as bundler `app-web` |
|
|
|
- the plain JS web app `app-web` |
|
|
|
- an example of React web app `app-react` |
|
|
|
- the React web app `app-react` |
|
|
|
- an example of node-js app `app-node` |
|
|
|
- the node-js app `app-node` |
|
|
|
- `index.html` an example of vanilla JS usage of the SDK |
|
|
|
|
|
|
|
|
|
|
|
## Support |
|
|
|
## Support |
|
|
|
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ And our community forum where you can ask questions is here [https://forum.nextg |
|
|
|
Read our [getting started guide](https://docs.nextgraph.org/en/getting-started/). |
|
|
|
Read our [getting started guide](https://docs.nextgraph.org/en/getting-started/). |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
``` |
|
|
|
npm i ng-app-js-sdk |
|
|
|
npm i ng-sdk-js |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
## For contributors |
|
|
|
## For contributors |
|
|
@ -51,13 +51,16 @@ cd pkg-node |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
For testing in vanilla JS |
|
|
|
For testing in vanilla JS |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
``` |
|
|
|
wasm-pack build --target web -d web |
|
|
|
wasm-pack build --target web -d web |
|
|
|
python3 -m http.server |
|
|
|
python3 -m http.server |
|
|
|
// open http://localhost:8000 |
|
|
|
// open http://localhost:8000 |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Or automated testing with headless chrome: |
|
|
|
Or automated testing with headless chrome: |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
``` |
|
|
|
wasm-pack test --chrome --headless |
|
|
|
wasm-pack test --chrome --headless |
|
|
|
``` |
|
|
|
``` |
|
|
@ -84,7 +87,7 @@ npm install --no-save ../pkg |
|
|
|
npm run dev |
|
|
|
npm run dev |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Open this URL in browser : [http://localhost:8080](http://localhost:8080) |
|
|
|
This URL will open automatically in browser : [http://localhost:8080](http://localhost:8080) |
|
|
|
|
|
|
|
|
|
|
|
### NodeJS app |
|
|
|
### NodeJS app |
|
|
|
|
|
|
|
|
|
|
@ -105,9 +108,10 @@ additional terms or conditions.s |
|
|
|
## License |
|
|
|
## License |
|
|
|
|
|
|
|
|
|
|
|
Licensed under either of |
|
|
|
Licensed under either of |
|
|
|
* Apache License, Version 2.0 ([LICENSE-APACHE2](LICENSE-APACHE2) or http://www.apache.org/licenses/LICENSE-2.0) |
|
|
|
|
|
|
|
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) |
|
|
|
- Apache License, Version 2.0 ([LICENSE-APACHE2](LICENSE-APACHE2) or http://www.apache.org/licenses/LICENSE-2.0) |
|
|
|
at your option. |
|
|
|
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) |
|
|
|
|
|
|
|
at your option. |
|
|
|
|
|
|
|
|
|
|
|
`SPDX-License-Identifier: Apache-2.0 OR MIT` |
|
|
|
`SPDX-License-Identifier: Apache-2.0 OR MIT` |
|
|
|
|
|
|
|
|