Skip to content

Commit

Permalink
fix: correct types
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Stewart committed Jul 31, 2020
1 parent 23e1edb commit fdedc48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: mkdir -p data
- name: Setup
run: mkdir -p data
- name: Download
uses: autovance/s3-sync-action@master
with:
Expand All @@ -27,10 +28,7 @@ jobs:
with:
args: unzip -qq ./data/canadian-city-timezones.zip -d ./src
- name: Release
run: |
ls -la
ls -la src
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
16 changes: 7 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Canadian City Timezones
<h1 align="center">Canadian City Timezones</h1>

<img height="500px" src="https://user-images.githubusercontent.com/15315657/88974322-ac2f2980-d275-11ea-937a-924e67ccf138.png" />
<p align="center">
<img height="500px" src="https://user-images.githubusercontent.com/15315657/88974322-ac2f2980-d275-11ea-937a-924e67ccf138.png" />
</p>

Searchable timezones for all Canadian cities, towns, townships, villages, hamlets, and municipalities.
<p align="center">Searchable timezones for all Canadian cities, towns, townships, villages, hamlets, and municipalities.</p>

## Usage

Expand All @@ -14,8 +16,7 @@ import {find, findAll} from 'canadian-city-timezones';
const result = await find('Lethbridge Alberta');
result.city // Lethbridge
result.province // Alberta
result.timezone // MST
result.timezoneName // America/Edmonton
result.timezone // America/Edmonton
```

## API
Expand All @@ -42,12 +43,9 @@ Returns all matching results for the given string.
city: string;
province: string;
timezone: string;
timezone_name: string;
}
```

## Development

Timezones are generated automatically by pulling the list of areas from `gc.ca` and feeding them into `locationiq.com`.

To trigger generation, create a commit containing `[data]` in the message.
Timezones are generated automatically by pulling the list of areas from `gc.ca` and feeding them into `mapbox.com` to get their coordinates, then getting the timezone using [`geo-tz`](https://github.com/evansiroky/node-geo-tz).
1 change: 0 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ declare interface TimezoneResult {
city: string;
province: string;
timezone: string;
timezoneName: string;
}

declare function find(query: string): Promise<TimezoneResult>;
Expand Down

0 comments on commit fdedc48

Please sign in to comment.