Skip to content

Commit 100ad54

Browse files
authored
Merge pull request #25 from neo-garaix/dev
Update readme
2 parents 2d93715 + 861af9a commit 100ad54

File tree

4 files changed

+57
-36
lines changed

4 files changed

+57
-36
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/).
3+
4+
# Contributing
5+
6+
### Modify
7+
8+
Any Rust file you wish to modify can be found in `src/` with some tests in `tests/proj4js_tests.rs`.
9+
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).
10+
11+
### Test
12+
13+
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/`.
14+
You can create another demo page with a HTML file + JavaScript file combo.

README.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99,40 +99,6 @@ let point = new Proj.Point(2.0, 1.0, 0.0);
9999
Proj.transform(from, to, point);
100100
```
101101

102-
## Compiling for WASM
103-
104-
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/)
105-
106-
```bash
107-
wasm-pack build --target web --no-default-features
108-
```
109-
110-
Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following
111-
command:
112-
113-
```bash
114-
cargo make wasm
115-
```
116-
117-
### Running the WASM example
118-
119-
There is a [`index.html`] file for testing the WASM module in a navigator.
120-
121-
For security reasons, you need to run it from a server.
122-
You can start a Python server with the following command:
123-
124-
```bash
125-
python3 -m http.server
126-
```
127-
128-
The server will automatically serve the `index.html` file in the current directory.
129-
130-
131-
## Build for npm
132-
133-
```
134-
cargo make wasm_bundle
135-
```
136-
137-
This will create a npm bundler package in pkg-bundler
102+
## Contributing
138103

104+
You can contribute to this library by going on the [proj4rs](./CONTRIBUTING.md) repository

README_WASM.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/).
3+
4+
# Build locally a package
5+
6+
## Compiling for WASM
7+
8+
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/)
9+
10+
```bash
11+
wasm-pack build --target web --no-default-features
12+
```
13+
14+
Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following
15+
command:
16+
17+
```bash
18+
cargo make wasm
19+
```
20+
21+
### Running the WASM example
22+
23+
There is a `index.html` file for testing the WASM module in a navigator.
24+
25+
For security reasons, you need to run it from a server.
26+
You can start a Python server with the following command:
27+
28+
```bash
29+
python3 -m http.server
30+
```
31+
32+
The server will automatically serve the `index.html` file in the current directory.
33+
34+
35+
## Build for npm
36+
37+
```bash
38+
cargo make wasm_bundle
39+
```
40+
41+
This will create a npm bundler package in pkg-bundler

ol-proj4rs-demo-app/favicon.ico

999 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)