troopjs updated to use bower. #529

Merged
merged 1 commit into from Apr 12, 2013

Conversation

Projects
None yet
4 participants
Member

stephenplusplus commented Apr 10, 2013

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.

Owner

addyosmani commented Apr 10, 2013

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

Member

stephenplusplus commented Apr 10, 2013

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.

Owner

sindresorhus commented Apr 10, 2013

I prefer the last option.

Member

passy commented Apr 10, 2013

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

Member

stephenplusplus commented Apr 11, 2013

Cool, I went through and made those changes.

Owner

addyosmani commented Apr 12, 2013

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 added a commit that referenced this pull request Apr 12, 2013

@addyosmani addyosmani merged commit 79ef244 into tastejs:gh-pages Apr 12, 2013

gustaff-weldon pushed a commit to gustaff-weldon/todomvc that referenced this pull request Dec 23, 2013

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