Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Update code to export umd, cjs, esm etc #212

Closed
wants to merge 8 commits into from

Conversation

weyert
Copy link

@weyert weyert commented Jan 12, 2020

Why

In the past there has been tickets raised that the library isn't straight away usable with create-react-app and other projects. I have created a test app at: https://github.com/weyert/restful-react-demo

This PR contains a bunch of changes at first the contained in PR #211 but then also:

  • Added new rollup-config specifically for the tools scripts named tools.rollup.config.js
  • Changed the locations of the build artefacts:
    - Tools scripts end up in lib
    - Actually components end up in dist
  • Expose size snapshots of the generated files
  • Moved the test files to their dedicated folder named __tests__
  • Added the necessary rollup-plugins

@seanlaff
Copy link
Contributor

Psyched for this!

@fabien0102
Copy link
Contributor

fabien0102 commented Jan 13, 2020

@weyert Sorry, you need to rebase this one, you have some commits from #211 in conflict

Something like this should do the job to avoid conflict resolution 😉:
git rebase --onto origin/master features/remove-operational-scripts features/just-use-rollup feature/

@@ -1,4 +1,4 @@
import { composePath, composeUrl } from "./composeUrl";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you move everything inside a __tests__ folder? 🤔

Copy link
Author

Choose a reason for hiding this comment

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

No, really reason, mainly it was late and I was having a feeling it was leaking into the final builds. I am happy to revisit and move them back if you want.

Copy link
Contributor

Choose a reason for hiding this comment

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

I usually prefer my tests aside the component (otherwise people forget about these 😬), but I get the leaking part, I have the same locally 😕 (I was playing a bit with tsdx today, to give a try and see if need all this extra configuration)

@fabien0102 fabien0102 mentioned this pull request Jan 13, 2020
@weyert weyert closed this Jan 14, 2020
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.

3 participants