Skip to content

Commit

Permalink
Merge pull request #80 from ciatph/fix/ciatph-79
Browse files Browse the repository at this point in the history
Fix/ciatph 79
  • Loading branch information
ciatph authored Aug 25, 2024
2 parents 94d272f + 9cb37b1 commit 2310893
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ jobs:
- name: Publish package
run: |
cp README.md app/
# Exclude examples
rm -r -f /app/examples
cd app
npm publish
env:
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ npm run list:region
- Asks users to enter the download URL of a remote excel file or use the default local excel file
- Loads and parses the local excel file in `/app/data/day1.xlsx` by default.
- Loads and parses the downloaded excel file in `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
- Loads and parses the downloaded excel file to `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
- Displays a list of available PH **region** names.
- Lists all provinces and municipalities of a specified region via commandline input.
- Asks for an option to write results to a JSON file.
Expand All @@ -162,7 +162,7 @@ npm run list:region
- Asks users to enter the download URL of a remote excel file or use the default local excel file
- Loads and parses the local excel file in `/app/data/day1.xlsx` by default.
- Loads and parses the downloaded excel file in `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
- Loads and parses the downloaded excel file to `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
- Lists all municipalities under specified province(s) via commandline input.
- Asks for an option to write results to a JSON file.
- Run the script as follows if installed using `npm i ph-municipalities`:
Expand Down Expand Up @@ -431,10 +431,7 @@ const file = new ExcelFile({
})
// Load provinces from the custom config file
const provinces = file
.settings
.data
.find(item => item.abbrev === 'INZ')?.provinces ?? []
const provinces = file.listProvinces('Inazuma')
// List the municipalities of defined provinces in the config file
// Note: Province/municipality names should match with those in the 10-day Excel file
Expand Down
1 change: 1 addition & 0 deletions app/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Dockerfile
*.xlsx
*.json
*.zip
*.tgz
dist/

# Ignore all JSON files except:
Expand Down
1 change: 1 addition & 0 deletions app/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules/
*.xlsx
*.json
*.zip
*.tgz
dist/

# Ignore all JSON files except:
Expand Down
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules/
*.xlsx
*.json
*.zip
*.tgz
dist/

# Ignore all JSON files except:
Expand Down
13 changes: 11 additions & 2 deletions app/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@ dist/
*.xlsx
*.json
*.zip
*.txt
*.tgz

.env.example
.eslintrc.js
.eslintrc_win.js
.gitignore
.npmignore
.eslintignore

# Ignore all JSON files except:
!package.json
!package-lock.json
!data/regions.json
!config/regions.json

# Ignore all Excel files except:
!data/regions.json
!data/day1.xlsx

# Exclude examples
src/examples/

# Docker
Dockerfile
.dockerignore
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ph-municipalities",
"version": "1.2.0",
"version": "1.2.1",
"description": "List and write the `municipalities` of Philippines provinces or regions into JSON files",
"main": "index.js",
"engines": {
Expand Down
5 changes: 1 addition & 4 deletions app/src/examples/05.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ const file = new ExcelFile({
})

// Load provinces from the custom config file
const provinces = file
.settings
.data
.find(item => item.abbrev === 'INZ')?.provinces ?? []
const provinces = file.listProvinces('Inazuma')

// List the municipalities of defined provinces in the config file
// Note: Province/municipality names should match with those in the 10-day Excel file
Expand Down

0 comments on commit 2310893

Please sign in to comment.