diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8de00b6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ + +The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/). + +# Contributing + +### Modify + +Any Rust file you wish to modify can be found in `src/` with some tests in `tests/proj4js_tests.rs`. +In order to test your new code, you need to build it thanks to WASM. More information on how to build it can be found in [README_WASM.md](./README_WASM.md). + +### Test + +If you want to test your code, you can ron locally some demos by reading [this README](./ol-proj4rs-demo-app/README.md) in `ol-proj4rs-demo-app/`. +You can create another demo page with a HTML file + JavaScript file combo. diff --git a/README.md b/README.md index b62d2a5..5fd7795 100644 --- a/README.md +++ b/README.md @@ -99,40 +99,6 @@ let point = new Proj.Point(2.0, 1.0, 0.0); Proj.transform(from, to, point); ``` -## Compiling for WASM - -Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/) - -```bash -wasm-pack build --target web --no-default-features -``` - -Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following -command: - -```bash -cargo make wasm -``` - -### Running the WASM example - -There is a [`index.html`] file for testing the WASM module in a navigator. - -For security reasons, you need to run it from a server. -You can start a Python server with the following command: - -```bash -python3 -m http.server -``` - -The server will automatically serve the `index.html` file in the current directory. - - -## Build for npm - -``` -cargo make wasm_bundle -``` - -This will create a npm bundler package in pkg-bundler +## Contributing +You can contribute to this library by going on the [proj4rs](./CONTRIBUTING.md) repository diff --git a/README_WASM.md b/README_WASM.md new file mode 100644 index 0000000..6c3da4b --- /dev/null +++ b/README_WASM.md @@ -0,0 +1,41 @@ + +The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/). + +# Build locally a package + +## Compiling for WASM + +Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/) + +```bash +wasm-pack build --target web --no-default-features +``` + +Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following +command: + +```bash +cargo make wasm +``` + +### Running the WASM example + +There is a `index.html` file for testing the WASM module in a navigator. + +For security reasons, you need to run it from a server. +You can start a Python server with the following command: + +```bash +python3 -m http.server +``` + +The server will automatically serve the `index.html` file in the current directory. + + +## Build for npm + +```bash +cargo make wasm_bundle +``` + +This will create a npm bundler package in pkg-bundler diff --git a/ol-proj4rs-demo-app/favicon.ico b/ol-proj4rs-demo-app/favicon.ico index e69de29..36d4780 100644 Binary files a/ol-proj4rs-demo-app/favicon.ico and b/ol-proj4rs-demo-app/favicon.ico differ