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
Don't commit build artifacts (dist and lib) to source control #6
Comments
Generally speaking you are right, but as this repo is used as a npm package, it should include production ready assets. That's why I did it this way. It is kinda hard to have a nice workflow for releasing react components to npm, so if you have any ideas, I'm open for suggestions. Thanks! |
Sorry it took me a while to reply.
For the npm package, you simply need to make sure that the build runs
before publishing. You could add it as a prepublish step if you like. Take
a look at how I handle Babel-standalone as an example, or how React works.
Neither of them have the build artifacts in source control, but they do
have a dist directory in the resulting npm package.
You simply need to add the dist directory to gitignore but *not* npmignore.
Sent from my phone.
…On Apr 28, 2017 7:23 AM, "Stanko" ***@***.***> wrote:
Closed #6 <#6>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHZsamtiNUNotFT1CdvrE281A8y2Cks5r0fZKgaJpZM4NFOtp>
.
|
Thanks, that makes sense, I'll take a look how they do it. Btw if you can direct me to a boilerplate for developing and releasing react components to npm, I would greatly appreciate it! |
Boilerplates always seem pretty overengineered to me, so I don't have experience with them as I've never used any of them. |
👍 on removing dist and lib from source code No need for boilerplate. Just do what @Daniel15 described
When you run |
Thank you very much both of you guys. I just fixed this (23aa395) and published. @kentandersen thanks for the other PR as well. |
Build artifacts (such as the
dist
andlib
directories in this repo) don't belong in source control 😃The text was updated successfully, but these errors were encountered: