Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert to typescript #5

Merged
merged 7 commits into from
Mar 25, 2019
Merged

convert to typescript #5

merged 7 commits into from
Mar 25, 2019

Conversation

leontastic
Copy link
Contributor

@leontastic leontastic commented Mar 23, 2019

Converting this library to typescript so we get typings in mira-dash.

The usage is ambiguous in some places (can use string or Date) but I opted for stricter typings, preferring only one type. In JS projects the code can be used as before, but in TS it is preferred to use the newly exported constants/enums instead of string options for recurrence rules:

recurrence_rule: {
  freq: Frequency.WEEKLY,
  byday: [WeekDay.MO, WeekDay.FR],
  dtstart: '2017-01-02T08:00',
}

@leontastic leontastic force-pushed the leontastic/feat/typescript branch 8 times, most recently from 3caae8d to db285e3 Compare March 23, 2019 13:49
@leontastic leontastic requested a review from jschr March 23, 2019 13:49
@leontastic leontastic marked this pull request as ready for review March 23, 2019 13:49
Copy link
Contributor Author

@leontastic leontastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final comment: the web bundle is huge, like 744 KB. Is this is an issue? We could possibly save bytes by minifying in webpack. Not an issue in mira-dash since we build from typescript.

docker/Dockerfile Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
"moment": "^2.20.1",
"moment-timezone": "^0.5.14",
"rrule-alt": "^2.2.7"
},
"jest": {
"testEnvironment": "node"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest being silly again jestjs/jest#6766 (comment)

package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/processOverrides.test.ts Show resolved Hide resolved
src/recurrenceIterator.test.ts Show resolved Hide resolved
src/recurrenceIterator.test.ts Show resolved Hide resolved
src/recurrenceIterator.test.ts Show resolved Hide resolved
webpack.config.js Outdated Show resolved Hide resolved
@mirainc mirainc deleted a comment from leontastic Mar 23, 2019
yarn.lock Show resolved Hide resolved
package.json Show resolved Hide resolved
@leontastic leontastic force-pushed the leontastic/feat/typescript branch 2 times, most recently from d444cf3 to 9fe3a5c Compare March 25, 2019 18:57
@leontastic
Copy link
Contributor Author

leontastic commented Mar 25, 2019

@jschr new changes

  1. removed webpack (dist folder build)
  2. removed bundle usage example from README
  3. removed .npmignore in favour of files in package.json
  4. cleaned up .gitignore
  5. incremented version number

I think this PR is good to go

@leontastic leontastic merged commit 8891729 into master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants