Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bower support #181

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
6 participants

Hi all,

I've been working on a modified version of BBB using Bower for a while and it has definitely allowed me to work better. That's why I'm sharing it today.

It is a replacement for the current implementation based on JamJS.

Bower's packages base is growing at a steady pace, plus it supports many ways of importing unlisted libraries easily.

According to Bower's FAQ, it could coexist with JamJS. However, I don't see the value in having both for this kind of project.

What do you think? Could this be useful?

Thanks,
Darío

Contributor

SBoudrias commented Dec 14, 2012

Hey, correct me if I'm wrong, but Bower don't auto-generate the require.config file? this one

@SBoudrias I honestly don't know...

genexp commented Jan 11, 2013

It doesn't autogenerate it. @dariocravero why do you find bower better than jamjs? (I was actually just working through the same though process you did and would love your thoughts)

FWIW - If you're using Bower you might want to use Yeoman as your build tools. It works fine with a BBB structured site. You can yeoman init bbb to see the minor structural differences.

Contributor

SBoudrias commented Jan 11, 2013

For my part, here's my pro con for each:

Jam

  • + Auto-generate an AMD config
  • - Use a hosted package server
  • - A lot of package are missing
  • - A lot of packages ain't kept up to date

Bower

  • + Use Github as package server (so every versions are available)
  • - Download the full repo (a lot of files - way too many)
  • - Need to manually setup the deps/shim config in Require

There's also volo and component that are well known package manager. I think it would be worth checking at these other solution. Personally, I always strip out jamjs from BBB as package ain't kept up to date, and not enough are available to be really usefull. If I use a package manager, I want to manage all my deps from it - using github (or any public git repo; bitbucket, google code) as the package server to me is a must have.

I like bower better because of the package's availability. I thought about
using yeoman but I just didn't fully buy into it -I like things a bit "more
raw" :).

In my opinion, having to generate AMD config isn't a big downside although
we could provide a way to automate that.

On the amount of files it downloads, I just ignore components on my repo
since at the end of the day, each developer will download the components
for local usage but when you compile it you'll be using the release.
Therefore you don't really need to commit those files.

Darío

On 11 January 2013 13:20, Simon Boudrias notifications@github.com wrote:

For my part, here's my pro con for each:

Jam

  • + Auto-generate an AMD config
  • - Use a hosted package server
  • - A lot of package are missing
  • - A lot of packages ain't kept up to date

Bower

  • + Use Github as package server (so every versions are available)
  • - Download the full repo (a lot of files - way too many)
  • - Need to manually setup the deps/shim config in Require

There's also volo and component that are well known package manager. I
think it would be worth checking at these other solution. Personally, I
always strip out jamjs from BBB as package ain't kept up to date, and
not enough are available to be really usefull. If I use a package manager,
I want to manage all my deps from it - using github (or any public git
repo; bitbucket, google code) as the package server to me is a must have.


Reply to this email directly or view it on GitHubhttps://github.com/tbranyen/backbone-boilerplate/pull/181#issuecomment-12151299.

Contributor

SBoudrias commented Jan 15, 2013

I looked recently at the Grunt-Bower-Task, I think if we would include Bower we definitely need a way to only get files we need (which isn't actually configurable by bower). Otherwise it's pretty annoying to have full repo cloned into our project (test, example, documentation).

The task I linked here allow an exportOverride option which allow for filtering only data you want. If not perfect, for now it's the best solution I've found to integrate in my workflow.

MoOx commented Feb 22, 2013

@SBoudrias It seems that Bower have an ignore option

Owner

tbranyen commented Apr 7, 2013

Meh, who cares about how many files are in the readme. I recommend grabbing with --depth=0 so fetching this repo isn't a big deal. The build process will only add in the files you use for production. Won't bulk up anything.

@tbranyen tbranyen closed this Apr 7, 2013

Owner

tbranyen commented Apr 7, 2013

Full Bowser support has been added via .bowerrc and component.json kinda pissed about needing yet another .json file that has nearly identical syntax to package.json....

Contributor

fiznool commented Apr 10, 2013

Now that we have full bower support is there any need for keeping jamjs too?

I know that jamjs auto-generates a require config file and it only downloads the files you need, but IMO those aren't good enough reasons to keep it when bower offers all packages that jamjs does, and more, fully up to date.

Having all dependencies in one place and (most importantly to me) defining them all in one file will really simplify the process, and since Bower has All The Packages it seems like the natural one to stick with.

Owner

tbranyen commented Apr 11, 2013

@fiznool I'd love to have that be an option in a scaffolding tool.

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