From 71810f684724245f17b5cee72be030f4a2467cca Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 4 Nov 2024 00:51:12 +0800 Subject: feat: add DEVELOPING.md for developers --- DEVELOPING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 54 insertions(+) create mode 100644 DEVELOPING.md diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 0000000..687e389 --- /dev/null +++ b/DEVELOPING.md @@ -0,0 +1,51 @@ +## Setting up development environment + +### Installing dependencies + +The minimum requirements are: +- GNU Bash +- [GNU Coreutils](https://www.gnu.org/software/coreutils/) +- Git +- Node.js (version 16 and above) + +To install the project dependencies run + +```sh +# install dependencies +npm install + +# install rollup or use npx +npm install -g rollup standard +``` + + +## Style guidelines + +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 + +``` +npm run lint +``` + + +## Linking Package + +```sh +# without code minified +npm build + +# with code minified +PRODUCTION=true npm build +``` + +## Firefox Addon + +1. To build addon(after `dist/` is generated from `npm build`), run + +```sh +npm run addon +``` + +2. Then go to `about:debugging` page in Firfox Browser, then press `This Firefox` for extension page + +3. Press `Load Temporary Add-on...`, then select `manifest.json` in `addon/` diff --git a/README.md b/README.md index 47d3542..59472d0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ This library generate web maps from [Semantic HTML], just play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/) +> [!IMPORTANT] +> For build steps about firefox addon, please visit `DEVELOPING.md` + > [!CAUTION] > DumbyMap is not in production stage. API is not stable now, use it carefully -- cgit v1.2.3-70-g09d2