Skip to content

Commit

Permalink
Merge pull request #49 from add2cal/dev
Browse files Browse the repository at this point in the history
stronger types
  • Loading branch information
jekuer committed Dec 13, 2022
2 parents d63948b + e977b79 commit e95c3fd
Show file tree
Hide file tree
Showing 10 changed files with 930 additions and 201 deletions.
9 changes: 1 addition & 8 deletions .eslintrc.json
Expand Up @@ -26,13 +26,6 @@
]
},
"plugins": ["@typescript-eslint"],
"ignorePatterns": [
"*.min.*",
"Gruntfile.js",
"zonesdb.js",
"generator.js",
"set-release.js",
"dist/"
],
"ignorePatterns": ["*.min.*", "Gruntfile.js", "zonesdb.js", "generator.js", "set-release.js", "dist/"],
"rules": {}
}
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Expand Up @@ -2,7 +2,7 @@ name: Deploy GitHub Pages

on:
push:
branches: ["main"]
branches: ['main']

workflow_dispatch:

Expand All @@ -12,7 +12,7 @@ permissions:
id-token: write

concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion api/zones.json
Expand Up @@ -594,4 +594,4 @@
"W-SU",
"WET",
"Zulu"
]
]
24 changes: 12 additions & 12 deletions generator.js
Expand Up @@ -3,7 +3,7 @@
* Add to Calendar TimeZones iCal Library
* ++++++++++++++++++++++++++++++++++++++
*
* Version: 1.5.0
* Version: 1.5.1
* Creator: Jens Kuerschner (https://jenskuerschner.de)
* Project: https://github.com/add2cal/timezones-ical-library
* License: Apache-2.0
Expand Down Expand Up @@ -43,17 +43,17 @@ const overviewJson = [];
const tzNamesSecDb = [];
const tzFinal = {};
const shortenerMap = {
"<br>":"<n>",
"TZNAME:":"<tz>",
"TZOFFSETFROM:":"<of>",
"TZOFFSETTO:":"<ot>",
"DTSTART:":"<s>",
"RRULE:":"<r>",
"BEGIN:DAYLIGHT":"<bd>",
"END:DAYLIGHT":"<ed>",
"BEGIN:STANDARD":"<bs>",
"END:STANDARD":"<es>"
}
'<br>': '<n>',
'TZNAME:': '<tz>',
'TZOFFSETFROM:': '<of>',
'TZOFFSETTO:': '<ot>',
'DTSTART:': '<s>',
'RRULE:': '<r>',
'BEGIN:DAYLIGHT': '<bd>',
'END:DAYLIGHT': '<ed>',
'BEGIN:STANDARD': '<bs>',
'END:STANDARD': '<es>',
};
for (const index in tz) {
overviewJson.push(index);
const contentParts = tz[`${index}`].split('<br>LAST-MODIFIED:');
Expand Down
6 changes: 3 additions & 3 deletions index.d.ts
@@ -1,5 +1,5 @@
declare module 'timezones-ical-library' {
export function tzlib_get_ical_block(tzName: string, jsonType?: boolean): void;
export function tzlib_get_offset(tzName: string, isoDate: string, isoTime: string): void;
export function tzlib_get_timezones(jsonType?: boolean): void;
export function tzlib_get_ical_block(tzName: string, jsonType?: boolean): string[] | string;
export function tzlib_get_offset(tzName: string, isoDate: string, isoTime: string): string;
export function tzlib_get_timezones(jsonType?: boolean): string[] | string;
}
8 changes: 4 additions & 4 deletions index.html
Expand Up @@ -55,7 +55,7 @@
<script async defer data-website-id="f221953d-158e-46c9-88d1-3b05df00997a" src="./demo_assets/js/a.min.js" data-host-url="https://a.add-to-calendar-button.com" data-domains="tz.add-to-calendar-technology.com"></script>

<!-- load some basic css just for this demo page here -->
<link rel="stylesheet" href="./demo_assets/css/demopage.min.css?v=1.5.0">
<link rel="stylesheet" href="./demo_assets/css/demopage.min.css?v=1.5.1">

</head>
<body>
Expand Down Expand Up @@ -263,15 +263,15 @@ <h3>Background story</h3>
This page is hosted via "GitHub Pages". It includes some very basic analytics, that still preserves your anonymity and does not use any cookies. However, mind that the GitHub privacy policy applies additionally (<a target="_blank" rel="noopener" href="https://docs.github.com/en/github/site-policy/github-privacy-statement">click here for details</a>).
</p>
</div>
<div id="tiny-version">v1.5.0</div>
<div id="tiny-version">v1.5.1</div>

</div>


<!-- js stuff -->
<script type="application/javascript" src="./dist/tzlib.js?v=1.5.0"></script>
<script type="application/javascript" src="./dist/tzlib.js?v=1.5.1"></script>
<script type="application/javascript" src="./demo_assets/js/autocomplete.min.js"></script>
<script type="application/javascript" src="./demo_assets/js/demopage.min.js?v=1.5.0"></script>
<script type="application/javascript" src="./demo_assets/js/demopage.min.js?v=1.5.1"></script>

</body>
</html>

0 comments on commit e95c3fd

Please sign in to comment.