diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74ed5d6..de0cca9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,7 +131,8 @@ jobs: - name: Publish package run: | - cp README.md app/ + chmod u+x scripts/npm-publish.sh + ./scripts/npm-publish.sh cd app npm publish env: diff --git a/README.md b/README.md index 186530a..cac376f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ It also asks users to key in the file download URL of a remote PAGASA 10-Day wea > _**INFO:** When installing the package using `npm i ph-municipalities`, the default data source is insideĀ `/data/day1.xlsx`. All source codes and files are also inside the **ph-municipalities** root directory._ +### Architecture Diagram + +![ph-municipalities-arch](/docs/diagrams/ph-municipalities-arch-90.png) + +### Dataset Output + Extracted municipalities are written in JSON files following the format: ``` @@ -65,6 +71,7 @@ The following dependencies are used for this project. Feel free to use other dep - [`npm run minify:all`](#npm-run-minifyall) - [`npm run lint`](#npm-run-lint) - [`npm run lint:fix`](#npm-run-lintfix) + - [`npm test`](#npm-test) - [Class Usage](#class-usage) - [Load and Parse a Local Excel File](#load-and-parse-a-local-excel-file) - [Download and Parse a Remote Excel File](#download-and-parse-a-remote-excel-file) @@ -220,6 +227,10 @@ Lint JavaScript source codes. Fix JavaScript lint errors. +### `npm test` + +Run tests defined in the `/app/__tests__` directory. + ## Class Usage Below are example usages of the `ExcelFile` class, run from the **/app/src/examples** directory. Check out the `/app/src/examples/sample_usage.js` file for more examples. diff --git a/app/package-lock.json b/app/package-lock.json index 99370e0..3e0b6c6 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "ph-municipalities", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ph-municipalities", - "version": "1.3.3", + "version": "1.3.4", "license": "ISC", "dependencies": { "dotenv": "^16.0.1", diff --git a/app/package.json b/app/package.json index 81ab17a..50a54c6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "ph-municipalities", - "version": "1.3.3", + "version": "1.3.4", "description": "List and write the `municipalities` of Philippines provinces or regions into JSON files", "main": "index.js", "engines": { diff --git a/docs/diagrams/ph-municipalities-arch-90.png b/docs/diagrams/ph-municipalities-arch-90.png new file mode 100644 index 0000000..b40d835 Binary files /dev/null and b/docs/diagrams/ph-municipalities-arch-90.png differ diff --git a/docs/diagrams/ph-municipalities-arch.drawio b/docs/diagrams/ph-municipalities-arch.drawio new file mode 100644 index 0000000..5a234a7 --- /dev/null +++ b/docs/diagrams/ph-municipalities-arch.drawio @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/npm-publish.sh b/scripts/npm-publish.sh new file mode 100644 index 0000000..fa08807 --- /dev/null +++ b/scripts/npm-publish.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sed "s|/docs/diagrams/||g" README.md > app/README.md +cp docs/diagrams/ph-municipalities-arch-90.png app/