Skip to content

Conversation

BookOfGreg
Copy link
Member

@BookOfGreg BookOfGreg commented Oct 12, 2017

This PR moves the package.json to the top level so it automatically picks up the readme and licence, to stop our NPM entry being to empty.

Not 100% it will work as intended, is there a nice way of verifying that the npm pack (doc) will do what we want before I break the NPM package @rmosolgo ?

This is based on the pattern of webpacker's package.

Edit: I could make a prerelease:
https://medium.com/@mbostock/prereleases-and-npm-e778fc5e2420

Putting package.json at the top level follows convention of
Webpacker and other gems that bundle JS. It allows sharing
of the licence and readme when looking at the package on NPM
@rmosolgo
Copy link
Member

👍 Makes sense to me, I see how you updated main and added react_ujs to files, so, seems like it'll be ok.

If not, you can always tweak and make another quick release 😅

@BookOfGreg
Copy link
Member Author

BookOfGreg commented Oct 12, 2017

Cool. I published as npm publish --tag beta as 2.3.0 and all seemed OK (Downloadable as yarn add react_ujs@beta). Downloaded it into my test app and it was all happy. Will add the #802 changes in as 2.3.1.

Just getting myself in a knot slightly with these branches, just me having teething issues is all.

I noticed in the npm pack step that both the source and dist folders were sent in the package, I may modify the node package in the future to be more minimal.

@BookOfGreg
Copy link
Member Author

https://www.npmjs.com/package/react_ujs

That looks better 👍

@BookOfGreg BookOfGreg merged commit 35d1530 into 2.3-stable Oct 12, 2017
@BookOfGreg BookOfGreg deleted the top-level-package-json branch October 12, 2017 15:47
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.

2 participants