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

Don't commit build artifacts (dist and lib) to source control #6

Closed
Daniel15 opened this issue Apr 22, 2017 · 6 comments
Closed

Don't commit build artifacts (dist and lib) to source control #6

Daniel15 opened this issue Apr 22, 2017 · 6 comments

Comments

@Daniel15
Copy link

Daniel15 commented Apr 22, 2017

Build artifacts (such as the dist and lib directories in this repo) don't belong in source control 😃

@Daniel15 Daniel15 changed the title Don't commit dist to source control Don't commit build artifacts (dist and lib) to source control Apr 22, 2017
@Stanko
Copy link
Owner

Stanko commented Apr 25, 2017

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!

@Stanko Stanko closed this as completed Apr 28, 2017
@Daniel15
Copy link
Author

Daniel15 commented Apr 28, 2017 via email

@Stanko Stanko reopened this Apr 28, 2017
@Stanko
Copy link
Owner

Stanko commented Apr 28, 2017

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!

@Daniel15
Copy link
Author

Daniel15 commented May 7, 2017

Boilerplates always seem pretty overengineered to me, so I don't have experience with them as I've never used any of them.

@kentandersen
Copy link
Contributor

👍 on removing dist and lib from source code

No need for boilerplate. Just do what @Daniel15 described

  1. add dist and lib to .gitignore, but not .npmignore
  2. add "prepublish": "npm run build" to scripts in package.json

When you run npm publish dist and lib will be updated before its pushed to npm. .gitignore will keep them out of source control

@Stanko
Copy link
Owner

Stanko commented Jun 21, 2017

Thank you very much both of you guys. I just fixed this (23aa395) and published. .npmignore was the thing I was missing.

@kentandersen thanks for the other PR as well.

@Stanko Stanko closed this as completed Jun 21, 2017
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

No branches or pull requests

3 participants