Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bower support #181

Closed
wants to merge 2 commits into from

6 participants

@dariocravero

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

Darío Javier... added some commits
@SBoudrias
Owner

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

@dariocravero

@SBoudrias I honestly don't know...

@genexp

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.

@SBoudrias
Owner

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.

@dariocravero
@SBoudrias
Owner

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

@SBoudrias It seems that Bower have an ignore option

@tbranyen
Owner

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
@tbranyen
Owner

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....

@fiznool

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.

@tbranyen
Owner

@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
Commits on Dec 4, 2012
  1. Refactored BBB to use Twitter's Bower instad of JamJS because of its

    Darío Javier Cravero authored
    wider support.
  2. Updated the readme with Bower's instruction

    Darío Javier Cravero authored
Something went wrong with that request. Please try again.