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 browserify outputs to package #26

Closed
hildjj opened this issue Apr 15, 2021 · 5 comments · Fixed by #53
Closed

Add browserify outputs to package #26

hildjj opened this issue Apr 15, 2021 · 5 comments · Fixed by #53
Assignees

Comments

@hildjj
Copy link
Contributor

hildjj commented Apr 15, 2021

use the browser field in package.json? WIll unpkg.com use that?

@hildjj
Copy link
Contributor Author

hildjj commented Apr 15, 2021

I don't think this should block the release. We'll need to do a 1.0.1 once we figure it out, but releases are cheap.

@hildjj
Copy link
Contributor Author

hildjj commented Apr 15, 2021

ok, I've confirmed that everything should work if we add browser, unpkg, and jsdelivr.

@hildjj hildjj self-assigned this Apr 15, 2021
@hildjj
Copy link
Contributor Author

hildjj commented Apr 15, 2021

Before:

npm notice package size:  60.1 kB
npm notice unpacked size: 305.5 kB

after:

npm notice package size:  94.6 kB
npm notice unpacked size: 463.0 kB

I think it's worth the extra size for the CDN convenience.

hildjj added a commit to hildjj/peggy that referenced this issue Apr 15, 2021
@hildjj hildjj reopened this Apr 16, 2021
@hildjj
Copy link
Contributor Author

hildjj commented Apr 16, 2021

This worked fine, but now we need to change the order of operations for release. You'll notice that https://unpkg.com/peggy@1.0.0-rc.1/browser/peggy.min.js still says rc.0 inside, as does the embedded VERSION string. So, we need to run a build after the version bump, but before checking in and tagging. If we were using lerna, we would just add a version script, I think, but unless we're going to move to a monorepo (e.g. to pull out the CLI), lerna is massive overkill. I'll probably just write a script and jam it in tools/.

@hildjj hildjj mentioned this issue Apr 16, 2021
@hildjj
Copy link
Contributor Author

hildjj commented Apr 16, 2021

OK, I just did rc2 using the release script. I like how simple it is. I suggest you don't use the script unless you have 2FA enabled on npm, because that gives you one last chance to bail before you can't recover.

@hildjj hildjj closed this as completed Apr 16, 2021
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 a pull request may close this issue.

1 participant