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

Improve Bower integration #479

Closed
wants to merge 1 commit into from

Conversation

xavierdutreilh
Copy link
Contributor

Hello,

As I was trying to set up the project on my laptop, I noticed some inconsistencies with how Bower was integrated. So, I took some time to work on it:

  1. Bower is installed locally from now on. A folder called node_modules is created when npm install is run and it contains all modules specific to the project (in our case, only Bower). This solution is a lot more clean since it takes some of the good ways from virtual environments (like installing things per project).
  2. npm install is now run automatically via make install. So, it ensures Bower is always installed.
  3. The package name in bower.json has been renamed from Django Project to djangoproject. My main concern was that such name is not permitted in Node.js modules. So, I had to stick with something consistent among all files and djangoproject seemed to be a good name.
  4. However, installing things locally creates an issue. Local binaries are not found any more and so, you need to find an alternative. The first solution is to append the PATH with node_modules/.bin but you have to run Bower from the root directory... The second solution is to use the scripts section from Npm. Commands like Bower could be run like this after that: npm run bower install. It chose that solution.

I think that is all. If you have any question, feel free to ask. If you want some modifications to the pull request or spot any mistake, I am listening.

@jezdez
Copy link
Contributor

jezdez commented Jul 4, 2015

@xavierdutreilh Thanks for this PR and sorry for the late reply. I think you're right with this, the only thing missing for your change is an update to the README though, basically to extend the pretty underwhelming section about using bower. Could you update that as well in your own words?

@xavierdutreilh
Copy link
Contributor Author

@jezdez, oh my, I completely forgot this pull request. I will take a look at the README and update it accordingly. Just, to be sure, when you say "the section about using Bower", you mean the section called "JavaScript libraries"?

@timgraham
Copy link
Member

Yes

@xavierdutreilh
Copy link
Contributor Author

@jezdez, @timgraham, I finally rewrote the section in the README. If you have any question, or think some parts need some clarification, feel free to ask.

@timgraham
Copy link
Member

merged in c37fa3c, thanks!

@timgraham timgraham closed this Dec 17, 2015
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.

None yet

3 participants