Skip to content

Use rollup to simplify build/babel/lint #282

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 3 commits into from
Closed

Use rollup to simplify build/babel/lint #282

wants to merge 3 commits into from

Conversation

jsg2021
Copy link
Contributor

@jsg2021 jsg2021 commented Jan 31, 2020

supersedes #243, #275.
includes #281

This updates all devDependencies to latest (as of now) and removes the need for any babel-runtime dependencies (rollup bakes them in & dedups them for us) This also moves zuul to a npx (on demand) script (since it prints many deprecation warnings atm) The only deprecation warning on install is core-js@2 (which comes from a babel-transform plugin)

Thoughts?

With this change, rollup produces both cjs & umd bundles. npm test passes.

@jsg2021
Copy link
Contributor Author

jsg2021 commented Jan 31, 2020

I just noticed #243 ... this maybe a cleaner approach. I made this produce the cjs/umd instead of producing an es module... This makes the original src/ the es code...and the cjs/umd the "fallbacks".

@jsg2021
Copy link
Contributor Author

jsg2021 commented Jan 31, 2020

since the umd is nearly ident to the cjs, I could just make the main point to the umd. and stop producing the /lib/index.js... that way there is only one fallback that covers browser & node (cjs).

@josephfrazier josephfrazier self-requested a review February 4, 2020 21:20
@jsg2021
Copy link
Contributor Author

jsg2021 commented Feb 12, 2020

I've rebased onto your master.

@jsg2021
Copy link
Contributor Author

jsg2021 commented Feb 13, 2020

I've updated this to incorporate yesterdays comments from #243 ... I've also fully commented the rollup config.

incorporate comments:
- Don't publish src.
- Rollup produces both umd and esm outputs.
@jsg2021
Copy link
Contributor Author

jsg2021 commented Aug 6, 2020

Squashed & rebased. Hope this is found useful :)

@slevithan
Copy link
Owner

slevithan commented Nov 18, 2020

This sounds good, but I'm not actively supporting XRegExp these days and I'm not very familiar with the details of cjs/umd/esm, rollup, babel, etc., so I'd appreciate insight from @josephfrazier or others.

@jsg2021
Copy link
Contributor Author

jsg2021 commented Nov 18, 2020

This should probably be inverted to produce a commonjs & umd build instead of esm & umd... let modern node have the raw sources.

This pull request was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants