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

Add support for bower package manager #77

Closed
wants to merge 7 commits into from
Closed

Add support for bower package manager #77

wants to merge 7 commits into from

Conversation

peters
Copy link

@peters peters commented May 25, 2013

Also added latest release files.

Visit http://bower.io for installation instructions.

After you have installed bower, you need to register the package:
bower register jquery.sparkline git://github.com/gwatts/jquery.sparkline.git

@@ -1,2 +1,2 @@
*
!.gitignore
!*.js
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why'd you add this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore all files except javascript. It's pretty much useless to integrate bower support if you have to manually
compile a dependency.

@gwatts
Copy link
Owner

gwatts commented May 25, 2013

The dist files should not be checked in as we'd have to continue to check them in after every commit - If bower isn't capable of running a make script, then it shouldn't be in the repo, but could be part of the build process instead and distributed as a .tar.gz

the dist directory uses * for it's .gitignore as it should also include things like the Changelist, which isn't .js

@gwatts
Copy link
Owner

gwatts commented Sep 15, 2013

Rejecting in favour of someone coming up with an alternative that doesn't involve checking in duplicate code.

@neverfox
Copy link

Bower requires a pre-built distribution. However, I don't see why this couldn't be handled here. It only responds to new release tags, so you wouldn't have to build and check in after every commit, unless you're tagging every commit as a new release. You could have stable built distribution file somewhere in the repo and set it as the main file for Bower.

@filipegiusti
Copy link

@neverfox this bower requirement is stupid and @gwatts doesn't want to do stupid things in his repository because of that.

@neverfox
Copy link

@filipegiusti Maybe so. Maybe not making your library accessible on what's becoming a widely adopted method of dependency management just to avoid adding 120kb or so to your repo is also stupid. Maybe the fact that Bower is becoming somewhat of a standard is stupid. I tend not to worry about it, since I imagine it'll all sort itself out.

@gwatts
Copy link
Owner

gwatts commented May 23, 2014

Someone else pointed out in another issue that you can do:
bower install --save http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.js
or
bower install --save http://omnipotent.net/jquery.sparkline/latest/jquery.sparkline.js

@neverfox
Copy link

@gwatts Yes, being able to use a direct link works fine. Not ideal for automatic semantic version control of dependencies, but it serves.

@filipegiusti
Copy link

@neverfox did you checked why jQuery doesn't commit the build to the repository? Can you understand that the problem is not only the 120kb in the repo?

@neverfox
Copy link

Sure, but just about every reason I've heard can be overcome by pushing the dist files to the tag (all Bower cares about) and resetting. No dist in the repo outside of those tags. No merge conflicts etc.

@bjmiller
Copy link

Can we put a very simple package.json in the repo, so that it can be installed using npm for use with Browserify?

It would only need a name, a version (which doesn't have to be the actual version, it only needs the field filled out with something) and a pointer to the Makefile so that it can run the build locally for the user after it installs.

Give an OK, and I'll submit a PR.

@gwatts gwatts mentioned this pull request Nov 14, 2014
@mryellow
Copy link

The dist copy should be specified as a main file, this means it is available after install from a known path. While using dist makes for nice clean Grunt path patterns, as almost everyone uses this path.

This would fit with the conventions I'm observing in your peers JS libs.

Here are some examples with dist committed to repo:
https://github.com/twbs/bootstrap
https://github.com/jquery/jquery
https://github.com/pouchdb/pouchdb

Here is an example where dist doesn't exist until Grunt is run:
https://github.com/knockout/knockout

edit: Actually PouchDB builds it after too.....

This works in concert with grunt grunt-bower-task and others which go through and install/build each lib from their bower config.

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.

6 participants