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

Add esm version #2

Merged
merged 6 commits into from
Jun 12, 2019
Merged

Add esm version #2

merged 6 commits into from
Jun 12, 2019

Conversation

smuemd
Copy link
Contributor

@smuemd smuemd commented May 17, 2019

This request proposes to (1) add an esm export to the script, (2) compile umd versions from that via rollup and (3) point to the appropriate versions via package.json's main and module fields. So this should be non-breaking.

Context: The library is being used in an upcoming example / tutorial on client side routing here: https://github.com/foxdonut/meiosis/blob/master/docs/lessons/routing.md

Being able to directly import the script into a browser would be awesome as per this discussion: https://gitter.im/foxdonut/meiosis?at=5cdd87b375d9a575a6f0a284

[index.js]

Replace `module.exports` with `exports.default`
[rollup.config.js]

Produce a umd version of the script as `feather-route-matcher.js`
Also produce a minified version as `feather-route-matcher.js`
Enable source maps for both

Add rollup and required plug ins as dev dependencies
[package.json]
[feather-route-matcher.*.js]

Compile index.js to umd [feather-route-matcher.js]
Add minified version [feather-route-matcher.min.js]
Add source maps
[test.js]
[package.json, README.md]

- Append change log
- Set version to 3.1.0
@HenrikJoreteg HenrikJoreteg merged commit 84efff1 into HenrikJoreteg:master Jun 12, 2019
@HenrikJoreteg
Copy link
Owner

thanks for making this easy :) published to npm as 3.1.0

@smuemd
Copy link
Contributor Author

smuemd commented Jun 14, 2019

Awesome!

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

2 participants