diff options
| -rw-r--r-- | DEVELOPING.md | 51 | ||||
| -rw-r--r-- | README.md | 3 |
2 files changed, 54 insertions, 0 deletions
diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 0000000..687e389 --- /dev/null +++ b/DEVELOPING.md | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | ## Setting up development environment | ||
| 2 | |||
| 3 | ### Installing dependencies | ||
| 4 | |||
| 5 | The minimum requirements are: | ||
| 6 | - GNU Bash | ||
| 7 | - [GNU Coreutils](https://www.gnu.org/software/coreutils/) | ||
| 8 | - Git | ||
| 9 | - Node.js (version 16 and above) | ||
| 10 | |||
| 11 | To install the project dependencies run | ||
| 12 | |||
| 13 | ```sh | ||
| 14 | # install dependencies | ||
| 15 | npm install | ||
| 16 | |||
| 17 | # install rollup or use npx | ||
| 18 | npm install -g rollup standard | ||
| 19 | ``` | ||
| 20 | |||
| 21 | |||
| 22 | ## Style guidelines | ||
| 23 | |||
| 24 | We use [StandardJS](https://standardjs.com/) with pre-defined ESLint rules to ensure a consistent coding style and catch potential bugs. For checking lint, run | ||
| 25 | |||
| 26 | ``` | ||
| 27 | npm run lint | ||
| 28 | ``` | ||
| 29 | |||
| 30 | |||
| 31 | ## Linking Package | ||
| 32 | |||
| 33 | ```sh | ||
| 34 | # without code minified | ||
| 35 | npm build | ||
| 36 | |||
| 37 | # with code minified | ||
| 38 | PRODUCTION=true npm build | ||
| 39 | ``` | ||
| 40 | |||
| 41 | ## Firefox Addon | ||
| 42 | |||
| 43 | 1. To build addon(after `dist/` is generated from `npm build`), run | ||
| 44 | |||
| 45 | ```sh | ||
| 46 | npm run addon | ||
| 47 | ``` | ||
| 48 | |||
| 49 | 2. Then go to `about:debugging` page in Firfox Browser, then press `This Firefox` for extension page | ||
| 50 | |||
| 51 | 3. Press `Load Temporary Add-on...`, then select `manifest.json` in `addon/` | ||
| @@ -2,6 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | This library generate web maps from [Semantic HTML], just play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/) | 3 | This library generate web maps from [Semantic HTML], just play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/) |
| 4 | 4 | ||
| 5 | > [!IMPORTANT] | ||
| 6 | > For build steps about firefox addon, please visit `DEVELOPING.md` | ||
| 7 | |||
| 5 | > [!CAUTION] | 8 | > [!CAUTION] |
| 6 | > DumbyMap is not in production stage. API is not stable now, use it carefully | 9 | > DumbyMap is not in production stage. API is not stable now, use it carefully |
| 7 | 10 | ||