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

Migrate to typescript with named exports #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rexxars
Copy link

@rexxars rexxars commented Sep 12, 2021

👋 Hi Thomas!

We're revamping autofoos, and since we're now writing it in typescript, I thought it would be nice if accolade was using it too so we get some slightly better type safety :)

Apologies for this big PR - wish there was less tooling needed for typescript + testing.

Anyway, main gist of this is:

  • Use jest instead of mocha (because it does better with typescript)
  • Use typescript preset for babel (and specify ie11 as lower barrier for browser support)
  • Add license file since it was missing
  • Change API to use named exports (it's just easier to work with across ESM, CommonJS and TypeScript)
  • Add typescript types
  • Run prettier on codebase
  • Use microbundle for bundling it
  • Mark the package as being free of side-effects, for better tree shaking
  • Run tests on GitHub actions as a CI

Let me know what you think!

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

Successfully merging this pull request may close these issues.

None yet

1 participant