Skip to content

Commit 6ac9a3d

Browse files
Matt d'EntremontMatt d'Entremont
Matt d'Entremont
authored and
Matt d'Entremont
committed
Expose rrule exports to window so they can be used in the browser debugger
- misc: Tweak the index.ts a bit to remove a line, and remove a comment as it was slightly confusing (there were exports above the "Exports" comment)
1 parent 79ac8ff commit 6ac9a3d

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

demo/demo.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import * as $ from 'jquery'
2-
import {
3-
RRule,
4-
Options,
5-
Weekday
6-
} from '../src/index'
2+
3+
import { RRule, Weekday, Options } from '../src/index'
4+
5+
// Make library accessible to browser debuggers so users can try things out themselves
6+
// tslint:disable-next-line:no-duplicate-imports
7+
import * as rruleExports from '../src/index'
8+
$.extend(window, rruleExports)
79

810
const getDay = (i: number) => [
911
RRule.MO,

src/index.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@
1616

1717
import RRule from './rrule'
1818
import RRuleSet from './rruleset'
19-
import { rrulestr } from './rrulestr'
19+
20+
export { rrulestr } from './rrulestr'
2021
export { Frequency, ByWeekday, Options } from './types'
2122
export { Weekday, WeekdayStr } from './weekday'
2223
export { RRuleStrOptions } from './rrulestr'
2324

24-
// =============================================================================
25-
// Export
26-
// =============================================================================
27-
2825
export {
2926
RRule,
30-
RRuleSet,
31-
rrulestr
27+
RRuleSet
3228
}
3329

3430
export default RRule

0 commit comments

Comments
 (0)