Skip to content

Add mention for Bower.json #5778

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

Closed
wants to merge 1 commit into from
Closed

Add mention for Bower.json #5778

wants to merge 1 commit into from

Conversation

krikke26
Copy link
Contributor

Like you would never commit the vendor folder, neither should you commit the Bower folder. At least bower.json should be mentioned. I would think it to be logic to commit the generate build files (/dist or /public) but not the dependencies.

@stof
Copy link
Member

stof commented Oct 14, 2015

The issue is that bower does not have a lock file currently, which means you would have no guarantee about what will get installed by other devs or during deployment.
And using exact versions in your bower.json works around this issue only if it contains all libraries used (i.e. all deps of your deps are also required explicitly at the root), which kind of defeat the usage of a package manager (you could as well replace bower with a script using curl to download all packages)

@krikke26
Copy link
Contributor Author

I agree on that (in a way). I'm not arguing the method or best practice but i think it should be mentioned that this is also a possible option next to the option of adding or ignoring the bower folder in git.

@xabbuh
Copy link
Member

xabbuh commented Oct 18, 2015

If we added such a sentence it should not get it's section (so we don't implicitly state that this option is of the same values as the one already described), but we could get a note explaining the consequences of choosing this solution (i.e. using control about the exact versions being installed).

However, I am not really convinced we should do that at all.

@wouterj
Copy link
Member

wouterj commented Dec 18, 2015

Hi @KriKe. I agree with you, we should at least mention commiting bower.json only. I've taken your changes and put it as a paragraph the above section: #6043

@wouterj wouterj closed this Dec 18, 2015
xabbuh added a commit that referenced this pull request Dec 31, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

Mention commiting only bower.json

Replaces #5778

| Q | A
| --- | ---
| Doc fix? | no
| New docs? | yes
| Applies to | all
| Fixed tickets | -

The section is called "Should I Git Ignore or Commit Bower Assets?", but we cover only the commit way and not the git ignore way, giving users a bit biased information. We should at least mention that people can also commit bower.json.

Thanks to @KriKe for providing the original patch!

Commits
-------

d701e3d Rewrite section about bower.json
1a98bca Add mention for Bower.json
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.

4 participants