Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(templates:coffee): cleanup & consistency fix of .coffee files #3

Merged
merged 1 commit into from
Jul 20, 2014

Conversation

meeDamian
Copy link
Contributor

Style fixes to match better with this

Changes include:

  • redundant parentheses removed
  • double quotes changed to single quotes where possible
  • angular methods are now consistently in a new line with same indentation level as their object

@meeDamian
Copy link
Contributor Author

Re-committed with missing spaces.

@@ -1,4 +1,5 @@
'use strict'

angular.module('<%= scriptAppName %>').service '<%= classedName %>', <%= classedName %> = ->
angular.module '<%= scriptAppName %>'
.service '<%= classedName %>', <%= classedName %> = ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaftMonk Any particular reason why we need to "name" function in a second parameter?

This regards to JS version as well:

angular.module('<%= scriptAppName %>')
  .service('<%= classedName %>', function <%= IS_THIS_NAME_NEEDED? %>() {
    // AngularJS will instantiate a singleton by calling "new" on this function
  });

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, actually that second name isn't really necessary.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we should change that to use cameledName name rather than classedName.

DaftMonk added a commit that referenced this pull request Jul 20, 2014
style(templates:coffee): cleanup & consistency fix of .coffee files
@DaftMonk DaftMonk merged commit ca8e12c into DaftMonk:master Jul 20, 2014
@meeDamian
Copy link
Contributor Author

Oh bummer, just pushed new version with removed unnecessary function naming and fixed to camelCase. Possible to merge that too?

@DaftMonk
Copy link
Owner

I think that will have to be in a separate PR, :-/ sorry about that.

@meeDamian
Copy link
Contributor Author

No prob :). I'll push later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants