-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use Rollup and Flattened Dist Directory #2
Conversation
@sallar This looks awesome! Thank you for taking the time to do this. I will take a look at this more closely later today, but at first glance this is exactly what I was thinking. As for the Github Action, that sounds like a better way to handle releases. Feel free to set that up if you would like! Is the Action a code change, or is that taken care of within github? Much appreciated, this is a big lift for me. |
My pleasure @andrew-levy |
@andrew-levy I added the GitHub action. Before merging to master, add the NPM secret here: Repo Settings > Secrets > Add Repository Secret name of secret: Im using this package to publish to npm: https://github.com/marketplace/actions/automated-releases-for-npm-packages And it uses this workflow:
|
@sallar Looks great. I was able to add my npm auth token of type 'automation', so I think this is ready to merge if you are done adding changes. Will the merge trigger the action? |
@andrew-levy awesome. yes it will trigger the action. it might fail though as the publish part hasnt been tested from this repo. if it does, I can quickly fix it. LGTM! |
@andrew-levy thanks for merging. seems like the publish was successful: |
@sallar Yep looks great! I noticed two things though.
|
@andrew-levy yes it's because the README wasn't copied to dist folder. I probably should make another PR and add that for you. Sorry about that, forgot :D The second part, yes I noticed it just now two. The trouble is, it has to commit the resulting package.json again to the repo, which creates a new commit which in turn will trigger the github action again. But there are ways to prevent that. I will fix this in my PR too! |
@andrew-levy a "cleaner" way would be to set the |
@sallar This works, I'll go ahead and merge those new changes in soon. Thanks again. Regarding the |
@andrew-levy not bundling PNG is a good idea. You might want to give the users the option to set the image by themselves (pass in as props) so they could use whatever library they want |
Hi! As discussed in #1, this is my take on publishing the package.
However, instead of just running
npm publish
, there is a custom script calledpublish:custom
now that we have to run.yarn publish:custom
for example. This results in deploying this structure to npm:And can be imported by users like this:
I can also add a Github Action that automatically releases this to NPM, when a Github Release is created. Let me know if you want me to also add this!
What do you think?
Closes #1