Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

TypeScript/Rollup Rewrite#18

Open
todd-elvers wants to merge 15 commits into
cawfree:masterfrom
todd-elvers:master
Open

TypeScript/Rollup Rewrite#18
todd-elvers wants to merge 15 commits into
cawfree:masterfrom
todd-elvers:master

Conversation

@todd-elvers

@todd-elvers todd-elvers commented May 29, 2021

Copy link
Copy Markdown
Contributor

TypeScript/Rollup Rewrite

  • Rewrote library in TypeScript
  • Changed from default-export syntax to named-export syntax
  • Rewrote Storybook config & stories in TypeScript
  • Added Storybook prop controls & more stories
  • Switched to the Rollup bundler
    • Allows us to output both a CJS and an ESM bundle
    • Allows us to compile animationData.json directly into the code
  • Resolved issue Outline on button :focus #17
  • Integrated parse-unit directly into the library
  • Added jest, ts-jest, and associated configuration for running tests with yarn test
  • Updated react-lottie-player to the latest version
  • Added pre-commit git hook to format all changed files w/ prettier before committing
    • Ensures we never have to look at formatting changes in a git diff
  • Added pre-commit git hook to compile the entire library before committing
    • Makes it impossible to commit code that does not compile
  • Updated README.md
  • Removed a lot of unused dependencies
  • Removed yarn.lock from .gitignore and committed it
  • Added .storybook and .babelrc to .npmignore
  • Bumped to 1.0.0
  • Moved react-lottie-player to peerDependencies
  • Added react and react-dom to peerDependencies

Todd Elvers added 9 commits May 29, 2021 10:33
Rewrote application in TypeScript
Rewrote Storybook config in TypeScript
Added Storybook controls and more stories
Changed bundler from babel to rollup
Added ESM support
Integrated parse-unit library directly into app
Added jest, ts-jest, and associated config for running tests
Updated react-lottie-player
Added commit hook for prettier so changed files are always formatted
Added commit hook to type-check app before allowing commits
@todd-elvers

Copy link
Copy Markdown
Contributor Author

Okay, I believe I'm done with my changes. Recent:

  • All files are now TypeScript, even the config files
  • Library also now requires all tests to pass before git commit will succeed

I'll be around this weekend if you have questions about any of these changes.

@todd-elvers

Copy link
Copy Markdown
Contributor Author

I've moved react and react-dom and react-lottie-player to peer-dependencies, reducing the bundle size. CJS bundle is less than 90 lines and ESM bundle is less than 60.

That's my final change, I swear 😄

Could someone create a canary/dev release so I can test?

@todd-elvers

Copy link
Copy Markdown
Contributor Author

@cawfree Any chance you could take a look at this? I can rebase if that helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant