CrowdHailer / fn.js

A JavaScript library built to encourage a functional programming style & strategy. - http://eliperelman.com/fn.js
MIT License
399 stars 30 forks source link

Add bower support #1

Closed eliperelman closed 10 years ago

sym3tri commented 10 years ago

+1

AngularJS and others take a nice approach of creating a separate repo that only houses the bower information and the built code (otherwise bower will download all the tests and build files etc).

https://github.com/angular/angular.js (main repo) https://github.com/angular/bower-angular (bower repo)

eliperelman commented 10 years ago

@sym3tri I like that idea. I'm going to be doing some refactoring to the repo to use gulp and incorporate some new build steps, and I think adding one that builds the bower repo sounds like a great idea. Thanks!

jpotterm commented 10 years ago

You don't need a separate repository to prevent Bower from downloading tests and other files. You can just add those to the Bower ignore array. For example: https://github.com/jquery/jquery/blob/master/bower.json

Bower support would be awesome. Thanks for the amazing library!

eliperelman commented 10 years ago

@jpotterm That is extremely helpful, thank you! This will be going in with the new build system.

I'm really glad you find fn.js useful!

jpotterm commented 10 years ago

Also, for anyone looking to install this via Bower before official support is added, Bower can work pretty well with just a regular Git URL. So you can install right now with:

bower install "git@github.com:eliperelman/fn.js.git#v0.6.1"
sym3tri commented 10 years ago

The problem with bower ignore is that you must explicitly state which files/paths to ignore. Maintenance can become tedious, especially for larger projects that change frequently. That might work for fn.js though.

On Friday, February 28, 2014, Jonathan Potter notifications@github.com wrote:

Also, for anyone looking to install this via Bower before official support is added, Bower can work pretty well with just a regular Git URL. So you can install right now with:

bower install "git@github.com:eliperelman/fn.js.git#v0.6.1"

— Reply to this email directly or view it on GitHubhttps://github.com/eliperelman/fn.js/issues/1#issuecomment-36375567 .

jpotterm commented 10 years ago

@sym3tri You can do a whitelist instead by using negated glob patterns. For example, to include only the backbone.js and backbone-min.js files you could do:

"ignore": ["./!(backbone*.js)"]

Note: this is according to https://github.com/bower/bower/issues/294#issuecomment-14780330, I haven't tested it myself.

sym3tri commented 10 years ago

Oh awesome. That didn't exist last time I setup bower (which was a while ago). Thanks for pointing that out.

On Fri, Feb 28, 2014 at 1:40 PM, Jonathan Potter notifications@github.comwrote:

@sym3tri https://github.com/sym3tri You can do a whitelist instead by using negated glob patterns. For example, to include only the backbone.jsand backbone-min.js files you could do:

"ignore": ["./!(backbone*.js)"]

Note: this is according to bower/bower#294 (comment)https://github.com/bower/bower/issues/294#issuecomment-14780330, I haven't tested it myself.

— Reply to this email directly or view it on GitHubhttps://github.com/eliperelman/fn.js/issues/1#issuecomment-36397206 .

eliperelman commented 10 years ago

Bower support is now official with fed32709942e7d988c377e7bf3c120fde3a1d72b. Unfortunately I screwed up the ignore parameter, so it downloads everything. I'll file a new issue for that, and will fix in the next release.