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

Rewrite to Typescript + fully Webpack build #111

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Rewrite to Typescript + fully Webpack build #111

merged 1 commit into from
Apr 2, 2019

Conversation

sergeyshmakov
Copy link
Contributor

  • Rewriten on Typescript to get more strict typings
  • Fixed IE11 iterate of NodeList's objects (crashes because NodeList not iterable and not have Array methods like forEach)
  • Rewriten build fully with Webpack to get more simple workflow
  • Tested in Chrome, IE 11, Edge, Firefox

@MatthewHerbst
Copy link
Owner

@gregnb thoughts?

@sergeyshmakov
Copy link
Contributor Author

@MatthewHerbst @gregnb Hey guys! How are you? =)

@MatthewHerbst
Copy link
Owner

I'm good thanks, hope you are well too :) It's @gregnb's package so I'll let him have the first say on this.

@gregnb
Copy link
Collaborator

gregnb commented Mar 28, 2019

Sorry guys, been really busy. This is pretty awesome. @MatthewHerbst what do you think? I'll leave the approval up to you

Copy link
Owner

@MatthewHerbst MatthewHerbst left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'm not too familiar with TS but I don't see anything that concerns me. Wouldn't mind one more pair of eyes on it.

@cmckni3 you started the initial TS work. Would you mind giving this a brief look over please?

},
"include": [
"./src"
"./src",
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: JSON shouldn't have trailing commas

Copy link
Contributor

@cmckni3 cmckni3 Apr 1, 2019

Choose a reason for hiding this comment

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

I agree with this suggestion. This could be problematic. iirc npm cli used to bomb out on these.

EDIT Noticed it's in tsconfig.json. TypeScript compiler is forgiving but I would change just in case.

"dom.iterable"
],
"importHelpers": true,
"jsx": "react",
"declaration": true,
"removeComments": true,
"downlevelIteration": true,
"allowSyntheticDefaultImports": true,
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: JSON shouldn't have trailing commas

@cmckni3
Copy link
Contributor

cmckni3 commented Apr 1, 2019

Sweet, looks like TypeScript is a go. This is what I envisioned the PR to look like.

👍 To separating the webpack configs for dev/prod as well.

Good catch with the iterable bugs @sergeyshmakov. That's why TypeScript was complaining and I had forced it // @ts-ignore and dom.iterable.

@MatthewHerbst
Copy link
Owner

Thanks for the super quick response @cmckni3!

@MatthewHerbst
Copy link
Owner

@gregnb once you're ready to release a new version (I think this is only a minor version chance since the Public API is unchanged) feel free to merge. Thanks for the work on this @sergeyshmakov!

@cmckni3
Copy link
Contributor

cmckni3 commented Apr 1, 2019

No problem! Thanks for the mention.

I would close #105 in favor of this.

@MatthewHerbst MatthewHerbst mentioned this pull request Apr 1, 2019
@cmckni3
Copy link
Contributor

cmckni3 commented Apr 1, 2019

One thing to note: importHelpers may pull in more helper functions than necessary. We're probably fine though due to babel tree shaking

@gregnb gregnb merged commit c79a1a2 into MatthewHerbst:master Apr 2, 2019
@gregnb
Copy link
Collaborator

gregnb commented Apr 2, 2019

All set published. Thanks everyone

@sergeyshmakov
Copy link
Contributor Author

@MatthewHerbst @gregnb 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants