Skip to content

Commit 2310893

Browse files
authored
Merge pull request #80 from ciatph/fix/ciatph-79
Fix/ciatph 79
2 parents 94d272f + 9cb37b1 commit 2310893

File tree

9 files changed

+21
-17
lines changed

9 files changed

+21
-17
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ jobs:
101101
- name: Publish package
102102
run: |
103103
cp README.md app/
104-
# Exclude examples
105-
rm -r -f /app/examples
106104
cd app
107105
npm publish
108106
env:

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ npm run list:region
151151
152152
- Asks users to enter the download URL of a remote excel file or use the default local excel file
153153
- Loads and parses the local excel file in `/app/data/day1.xlsx` by default.
154-
- Loads and parses the downloaded excel file in `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
154+
- Loads and parses the downloaded excel file to `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
155155
- Displays a list of available PH **region** names.
156156
- Lists all provinces and municipalities of a specified region via commandline input.
157157
- Asks for an option to write results to a JSON file.
@@ -162,7 +162,7 @@ npm run list:region
162162
163163
- Asks users to enter the download URL of a remote excel file or use the default local excel file
164164
- Loads and parses the local excel file in `/app/data/day1.xlsx` by default.
165-
- Loads and parses the downloaded excel file in `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
165+
- Loads and parses the downloaded excel file to `/app/data/datasource.xlsx` if download URL in the class constructor is provided.
166166
- Lists all municipalities under specified province(s) via commandline input.
167167
- Asks for an option to write results to a JSON file.
168168
- Run the script as follows if installed using `npm i ph-municipalities`:
@@ -431,10 +431,7 @@ const file = new ExcelFile({
431431
})
432432

433433
// Load provinces from the custom config file
434-
const provinces = file
435-
.settings
436-
.data
437-
.find(item => item.abbrev === 'INZ')?.provinces ?? []
434+
const provinces = file.listProvinces('Inazuma')
438435

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

app/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Dockerfile
1010
*.xlsx
1111
*.json
1212
*.zip
13+
*.tgz
1314
dist/
1415

1516
# Ignore all JSON files except:

app/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules/
44
*.xlsx
55
*.json
66
*.zip
7+
*.tgz
78
dist/
89

910
# Ignore all JSON files except:

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules/
44
*.xlsx
55
*.json
66
*.zip
7+
*.tgz
78
dist/
89

910
# Ignore all JSON files except:

app/.npmignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,27 @@ dist/
66
*.xlsx
77
*.json
88
*.zip
9+
*.txt
10+
*.tgz
911

1012
.env.example
1113
.eslintrc.js
1214
.eslintrc_win.js
1315
.gitignore
1416
.npmignore
17+
.eslintignore
1518

1619
# Ignore all JSON files except:
1720
!package.json
1821
!package-lock.json
19-
!data/regions.json
22+
!config/regions.json
2023

2124
# Ignore all Excel files except:
22-
!data/regions.json
2325
!data/day1.xlsx
26+
27+
# Exclude examples
28+
src/examples/
29+
30+
# Docker
31+
Dockerfile
32+
.dockerignore

app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ph-municipalities",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "List and write the `municipalities` of Philippines provinces or regions into JSON files",
55
"main": "index.js",
66
"engines": {

app/src/examples/05.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ const file = new ExcelFile({
1313
})
1414

1515
// Load provinces from the custom config file
16-
const provinces = file
17-
.settings
18-
.data
19-
.find(item => item.abbrev === 'INZ')?.provinces ?? []
16+
const provinces = file.listProvinces('Inazuma')
2017

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

0 commit comments

Comments
 (0)