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

Remove .gitignore from bower package #3801

Closed
BrunnerLivio opened this issue Jan 17, 2017 · 6 comments
Closed

Remove .gitignore from bower package #3801

BrunnerLivio opened this issue Jan 17, 2017 · 6 comments

Comments

@BrunnerLivio
Copy link

BrunnerLivio commented Jan 17, 2017

Expected Behavior

It should not ignore the dist directory when chartjs is installed using bower.

Context

We check-in the dependencies into our source control, because we don't mirror bower packages locally on our servers. When we add Chart.js as bower dependency, the dist folder got ignored from the source control, because of the .gitignore in the bower package. Is it possible to remove the file in the bower package, or is it needed?

Environment

  • Chart.js version: 2.4.0
@tsvetan-ganev
Copy link

I installed version 2.4.0 via bower and the dist/ folder wasn't generated at all. This broke our build process since we are using the minified versions of the library. I had to downgrade to 2.3.0, which works fine.

@simonbrunel
Copy link
Member

@BrunnerLivio if I'm not wrong, there is no "bower package" because contrary to npm packages, bower packages are simply references over the git repository, meaning that it would require to remove the .gitignore from our release tags, which is something we might not want to change.

Instead, why not simply force add these files: git add --force bower_components/chart.js/dist/*

@tsvetan-ganev that's weird, I just created a fresh bower project, installed chartjs and the dist folder is there. Maybe something related to #3371.

@BrunnerLivio
Copy link
Author

BrunnerLivio commented Jan 17, 2017

@simonbrunel

meaning that it would require to remove the .gitignore from our release tags, which is something we might not want to change.

I agree with this. Maybe ignore the .gitignore in the bower.json file (Have not tried this, don't know if it works)? Or other projects, like angular translate or AngularJS istelf created a new repository just for their bower packages. As far as I know you chart.js does not do this. (+ as you can see angular and angular-translate also don't have .gitignore in their bower repository, so I suppose Chart.js should do that too?)

@simonbrunel
Copy link
Member

simonbrunel commented Jan 17, 2017

I don't think we want to deal with a different repository and change our automated build process for this specific bower use case. Having .gitignore in bower.json looks like the way to go, so we can definitely try this for 2.5. @chartjs/maintainers do you see any (compatibility) issue with that approach?

Still, git add --force would solve your issue immediately.

@etimberg
Copy link
Member

@simonbrunel I don't have a problem with trying it. I don't think it will break anything, but a quick google couldn't confirm that.

@simonbrunel simonbrunel added this to the Version 2.5 milestone Jan 17, 2017
@tsvetan-ganev
Copy link

@simonbrunel, you are right. After running bower cache clean, I installed 2.4.0 in an empty directory and the dist/ folder was generated correctly.

It's not the first time that bower behaves unexpectedly so I'm not surprised. Next time when something like this happens, I will clean the cache first. Thanks for pointing me at the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants