-
Notifications
You must be signed in to change notification settings - Fork 374
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
Unable to add library to repo because the /dist
directory is ignored
#400
Comments
I think we can just drop the ignore on |
👍 |
That's interesting. To me it makes sense that you would want to ignore the But since you specify the Thanks. |
If we drop the dist from .gitignore we'll have to make sure that the gh-pages download links point to the tag of the current release and not to master. |
@stoeffel I don't think nothing changes from this. We'll still just commit files in |
@epeli yes you are right. And we can reject PRs with dist files. |
@caspyin try 3.0.2 to see if this issue is fixed now |
Yep it does! Thanks, you're both awesome! 🍻 |
Problem
I'm using this project in a Rails app that I've wired up to use Bower to manage dependencies and am deploying to Heroku.
I have a staging environment and everything would work fine when I ran the app in staging locally but when I pushed to Heroku, I would get an error about Sprockets not being able to find the file
underscore.string/dist/underscore.string.js
. When I looked on the Heroku file system, sure enough the/dist
directory wasn't there.Eventually I realized the reason this was happening is because I was adding all of my
bower_components
to the repo so Heroku would just use what was being pushed rather than downloading fresh from abower install
. Now because the/dist
directory is in the.gitignore
file for this project it wasn't being added to thebower_components/underscore.string/
folder in my repo and therefore never pushed to Heroku.I solved my problem by removing this library from the
bower_components
folder in the repo and just let Heroku download it. However this isn't ideal because I would like to have the option to store the library in my repo if I want.So as I understand it, since the
/dist
directory is ignored in this project no one is able to simply do abower install --save
and commit this lib to their repo. If you want this lib stored in your repo you have to either:/dist
folder to the repoSolutions
I've never maintained a project for Bower distribution so I don't know what the best answer is (you guys probably have some ideas already) but after doing some research here is what I came up with.
Tell Bower to ignore everything: According to this blog post it is pretty common to use the
ignore
property inbower.json
to ignore everything except what should be distributed. Thoughtbot's Bourbon project takes this approach.Create a project specifically for Bower distribution: Having a separate project specifically for Bower distribution also appears to be pretty common. As an example this is what the Angular team does.
Thoughts?
The text was updated successfully, but these errors were encountered: