Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


troopjs updated to use bower. #529

merged 1 commit into from

4 participants


Updated the Troop.js example to use Bower. The changes:

  • Updated troopjs-bundle, it's now the non-minified version.
  • Added in the "escape-to-cancel" functionality.
  • Went through some code styling cleanup.

I'm not sure you'll be a fan of the way I defined the modules.

How I did it:

function CountModule(Widget, $) {

I like that, as opposed to:

define(['troopjs-core/component/widget', 'jquery'], function CountModule(Widget, $) {


], function CountModule(Widget, $) {

That, or any other style you prefer, I'm happy to change them to.


Thanks for this! I personally prefer the second option as I feel it has better readability across the line however others may have their own opinions :)


I do prefer that too, when there aren't as many dependencies, or ones with short names :) But, I'm always in favor of sticking with conventions, so unless there are more votes for #1, I'll make the conversion to #2 tonight.


I prefer the last option.


Me too. The last option works for long as well as short lists and dependency names.


Cool, I went through and made those changes.


I'm okay with us proceeding with the last option, but if we do we should make sure that we try to be consistent across these types of implementations. Might be worth adding to the style guide.

@addyosmani addyosmani merged commit 79ef244 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 11, 2013
  1. @stephenplusplus
Something went wrong with that request. Please try again.