Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

troopjs updated to use bower. #529

Merged
merged 1 commit into from

4 participants

@stephenplusplus

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:

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

I like that, as opposed to:

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

or:

define([
    'troppjs-core/component/widget',
    'jquery'
], function CountModule(Widget, $) {
...
});

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

@addyosmani
Owner

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 :)

@stephenplusplus

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.

@sindresorhus

I prefer the last option.

@passy
Owner

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

@stephenplusplus

Cool, I went through and made those changes.

@addyosmani
Owner

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.