Skip to content

Commit 18c4c31

Browse files
committed
style(app): update style to match jscs style guide
1 parent 8a1a245 commit 18c4c31

File tree

81 files changed

+676
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+676
-521
lines changed

app/templates/.jscs.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
{
2-
"preset": "google"
2+
"preset": "google",
3+
"maximumLineLength": {
4+
"value": 100,
5+
"allowComments": true,
6+
"allowRegex": true
7+
},
8+
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
9+
"requireSpacesInsideObjectBrackets": "all",
10+
"disallowSpacesInsideObjectBrackets": "nested",
11+
"requireSpacesInConditionalExpression": true
312
}

app/templates/Gruntfile.js

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module.exports = function (grunt) {
8080
'<%%= yeoman.client %>/{app,components}/**/*.mock.js'
8181
],
8282
tasks: ['newer:jshint:all', 'karma']
83-
},<% if(filters.stylus) { %>
83+
},<% if (filters.stylus) { %>
8484
injectStylus: {
8585
files: [
8686
'<%%= yeoman.client %>/{app,components}/**/*.styl'],
@@ -90,7 +90,7 @@ module.exports = function (grunt) {
9090
files: [
9191
'<%%= yeoman.client %>/{app,components}/**/*.styl'],
9292
tasks: ['stylus', 'autoprefixer']
93-
},<% } %><% if(filters.sass) { %>
93+
},<% } %><% if (filters.sass) { %>
9494
injectSass: {
9595
files: [
9696
'<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
@@ -100,7 +100,7 @@ module.exports = function (grunt) {
100100
files: [
101101
'<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
102102
tasks: ['sass', 'autoprefixer']
103-
},<% } %><% if(filters.less) { %>
103+
},<% } %><% if (filters.less) { %>
104104
injectLess: {
105105
files: [
106106
'<%%= yeoman.client %>/{app,components}/**/*.less'],
@@ -110,13 +110,13 @@ module.exports = function (grunt) {
110110
files: [
111111
'<%%= yeoman.client %>/{app,components}/**/*.less'],
112112
tasks: ['less', 'autoprefixer']
113-
},<% } %><% if(filters.jade) { %>
113+
},<% } %><% if (filters.jade) { %>
114114
jade: {
115115
files: [
116116
'<%%= yeoman.client %>/{app,components}/*',
117117
'<%%= yeoman.client %>/{app,components}/**/*.jade'],
118118
tasks: ['jade']
119-
},<% } %><% if(filters.coffee) { %>
119+
},<% } %><% if (filters.coffee) { %>
120120
coffee: {
121121
files: [
122122
'<%%= yeoman.client %>/{app,components}/**/*.{coffee,litcoffee,coffee.md}',
@@ -458,18 +458,18 @@ module.exports = function (grunt) {
458458

459459
// Run some tasks in parallel to speed up the build process
460460
concurrent: {
461-
server: [<% if(filters.coffee) { %>
462-
'coffee',<% } %><% if(filters.jade) { %>
463-
'jade',<% } %><% if(filters.stylus) { %>
464-
'stylus',<% } %><% if(filters.sass) { %>
465-
'sass',<% } %><% if(filters.less) { %>
461+
server: [<% if (filters.coffee) { %>
462+
'coffee',<% } %><% if (filters.jade) { %>
463+
'jade',<% } %><% if (filters.stylus) { %>
464+
'stylus',<% } %><% if (filters.sass) { %>
465+
'sass',<% } %><% if (filters.less) { %>
466466
'less',<% } %>
467467
],
468-
test: [<% if(filters.coffee) { %>
469-
'coffee',<% } %><% if(filters.jade) { %>
470-
'jade',<% } %><% if(filters.stylus) { %>
471-
'stylus',<% } %><% if(filters.sass) { %>
472-
'sass',<% } %><% if(filters.less) { %>
468+
test: [<% if (filters.coffee) { %>
469+
'coffee',<% } %><% if (filters.jade) { %>
470+
'jade',<% } %><% if (filters.stylus) { %>
471+
'stylus',<% } %><% if (filters.sass) { %>
472+
'sass',<% } %><% if (filters.less) { %>
473473
'less',<% } %>
474474
],
475475
debug: {
@@ -481,11 +481,11 @@ module.exports = function (grunt) {
481481
logConcurrentOutput: true
482482
}
483483
},
484-
dist: [<% if(filters.coffee) { %>
485-
'coffee',<% } %><% if(filters.jade) { %>
486-
'jade',<% } %><% if(filters.stylus) { %>
487-
'stylus',<% } %><% if(filters.sass) { %>
488-
'sass',<% } %><% if(filters.less) { %>
484+
dist: [<% if (filters.coffee) { %>
485+
'coffee',<% } %><% if (filters.jade) { %>
486+
'jade',<% } %><% if (filters.stylus) { %>
487+
'stylus',<% } %><% if (filters.sass) { %>
488+
'sass',<% } %><% if (filters.less) { %>
489489
'less',<% } %>
490490
'imagemin',
491491
'svgmin'
@@ -579,7 +579,7 @@ module.exports = function (grunt) {
579579
NODE_ENV: 'production'
580580
},
581581
all: localConfig
582-
},<% if(filters.jade) { %>
582+
},<% if (filters.jade) { %>
583583

584584
// Compiles Jade to html
585585
jade: {
@@ -599,7 +599,7 @@ module.exports = function (grunt) {
599599
ext: '.html'
600600
}]
601601
}
602-
},<% } %><% if(filters.coffee) { %>
602+
},<% } %><% if (filters.coffee) { %>
603603

604604
// Compiles CoffeeScript to JavaScript
605605
coffee: {
@@ -619,7 +619,7 @@ module.exports = function (grunt) {
619619
ext: '.js'
620620
}]
621621
}
622-
},<% } %><% if(filters.stylus) { %>
622+
},<% } %><% if (filters.stylus) { %>
623623

624624
// Compiles Stylus to CSS
625625
stylus: {
@@ -636,7 +636,7 @@ module.exports = function (grunt) {
636636
'.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.styl'
637637
}
638638
}
639-
},<% } %><% if(filters.sass) { %>
639+
},<% } %><% if (filters.sass) { %>
640640

641641
// Compiles Sass to CSS
642642
sass: {
@@ -653,7 +653,7 @@ module.exports = function (grunt) {
653653
'.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.scss'
654654
}
655655
}
656-
},<% } %><% if(filters.less) { %>
656+
},<% } %><% if (filters.less) { %>
657657

658658
// Compiles Less to CSS
659659
less: {
@@ -694,7 +694,7 @@ module.exports = function (grunt) {
694694
'!{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.mock.js']
695695
]
696696
}
697-
},<% if(filters.stylus) { %>
697+
},<% if (filters.stylus) { %>
698698

699699
// Inject component styl into app.styl
700700
stylus: {
@@ -713,7 +713,7 @@ module.exports = function (grunt) {
713713
'!<%%= yeoman.client %>/app/app.styl'
714714
]
715715
}
716-
},<% } %><% if(filters.sass) { %>
716+
},<% } %><% if (filters.sass) { %>
717717

718718
// Inject component scss into app.scss
719719
sass: {
@@ -732,7 +732,7 @@ module.exports = function (grunt) {
732732
'!<%%= yeoman.client %>/app/app.{scss,sass}'
733733
]
734734
}
735-
},<% } %><% if(filters.less) { %>
735+
},<% } %><% if (filters.less) { %>
736736

737737
// Inject component less into app.less
738738
less: {
@@ -797,9 +797,9 @@ module.exports = function (grunt) {
797797
if (target === 'debug') {
798798
return grunt.task.run([
799799
'clean:server',
800-
'env:all',<% if(filters.stylus) { %>
801-
'injector:stylus', <% } %><% if(filters.less) { %>
802-
'injector:less', <% } %><% if(filters.sass) { %>
800+
'env:all',<% if (filters.stylus) { %>
801+
'injector:stylus', <% } %><% if (filters.less) { %>
802+
'injector:less', <% } %><% if (filters.sass) { %>
803803
'injector:sass', <% } %>
804804
'concurrent:server',
805805
'injector',
@@ -811,9 +811,9 @@ module.exports = function (grunt) {
811811

812812
grunt.task.run([
813813
'clean:server',
814-
'env:all',<% if(filters.stylus) { %>
815-
'injector:stylus', <% } %><% if(filters.less) { %>
816-
'injector:less', <% } %><% if(filters.sass) { %>
814+
'env:all',<% if (filters.stylus) { %>
815+
'injector:stylus', <% } %><% if (filters.less) { %>
816+
'injector:less', <% } %><% if (filters.sass) { %>
817817
'injector:sass', <% } %>
818818
'concurrent:server',
819819
'injector',
@@ -844,9 +844,9 @@ module.exports = function (grunt) {
844844
else if (target === 'client') {
845845
return grunt.task.run([
846846
'clean:server',
847-
'env:all',<% if(filters.stylus) { %>
848-
'injector:stylus', <% } %><% if(filters.less) { %>
849-
'injector:less', <% } %><% if(filters.sass) { %>
847+
'env:all',<% if (filters.stylus) { %>
848+
'injector:stylus', <% } %><% if (filters.less) { %>
849+
'injector:less', <% } %><% if (filters.sass) { %>
850850
'injector:sass', <% } %>
851851
'concurrent:test',
852852
'injector',
@@ -859,9 +859,9 @@ module.exports = function (grunt) {
859859
return grunt.task.run([
860860
'clean:server',
861861
'env:all',
862-
'env:test',<% if(filters.stylus) { %>
863-
'injector:stylus', <% } %><% if(filters.less) { %>
864-
'injector:less', <% } %><% if(filters.sass) { %>
862+
'env:test',<% if (filters.stylus) { %>
863+
'injector:stylus', <% } %><% if (filters.less) { %>
864+
'injector:less', <% } %><% if (filters.sass) { %>
865865
'injector:sass', <% } %>
866866
'concurrent:test',
867867
'injector',
@@ -914,9 +914,9 @@ module.exports = function (grunt) {
914914
});
915915

916916
grunt.registerTask('build', [
917-
'clean:dist',<% if(filters.stylus) { %>
918-
'injector:stylus', <% } %><% if(filters.less) { %>
919-
'injector:less', <% } %><% if(filters.sass) { %>
917+
'clean:dist',<% if (filters.stylus) { %>
918+
'injector:stylus', <% } %><% if (filters.less) { %>
919+
'injector:less', <% } %><% if (filters.sass) { %>
920920
'injector:sass', <% } %>
921921
'concurrent:dist',
922922
'injector',

app/templates/_.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules
22
public
3-
.tmp<% if(filters.sass) { %>
3+
.tmp<% if (filters.sass) { %>
44
.sass-cache<% } %>
55
.idea
66
client/bower_components

app/templates/_bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"angular": ">=1.2.*",
66
"json3": "~3.3.1",
77
"es5-shim": "~3.0.1",
8-
"jquery": "~1.11.0",<% if(filters.bootstrap) { %><% if (filters.sass) { %>
8+
"jquery": "~1.11.0",<% if (filters.bootstrap) { %><% if (filters.sass) { %>
99
"bootstrap-sass-official": "~3.1.1",<% } %>
1010
"bootstrap": "~3.1.1",<% } %>
1111
"angular-resource": ">=1.2.*",
1212
"angular-cookies": ">=1.2.*",
13-
"angular-sanitize": ">=1.2.*",<% if(filters.ngroute) { %>
14-
"angular-route": ">=1.2.*",<% } %><% if(filters.uibootstrap) { %>
13+
"angular-sanitize": ">=1.2.*",<% if (filters.ngroute) { %>
14+
"angular-route": ">=1.2.*",<% } %><% if (filters.uibootstrap) { %>
1515
"angular-bootstrap": "~0.11.0",<% } %>
1616
"font-awesome": ">=4.1.0",
17-
"lodash": "~2.4.1"<% if(filters.socketio) { %>,
18-
"angular-socket-io": "~0.6.0"<% } %><% if(filters.uirouter) { %>,
17+
"lodash": "~2.4.1"<% if (filters.socketio) { %>,
18+
"angular-socket-io": "~0.6.0"<% } %><% if (filters.uirouter) { %>,
1919
"angular-ui-router": "~0.2.10"<% } %>
2020
},
2121
"devDependencies": {

app/templates/_package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
"express-session": "~1.0.2",
1313
"errorhandler": "~1.0.0",
1414
"compression": "~1.0.1",
15-
"lodash": "~2.4.1",<% if(filters.jade) { %>
16-
"jade": "~1.2.0",<% } %><% if(filters.html) { %>
17-
"ejs": "~0.8.4",<% } %><% if(filters.mongoose) { %>
15+
"lodash": "~2.4.1",<% if (filters.jade) { %>
16+
"jade": "~1.2.0",<% } %><% if (filters.html) { %>
17+
"ejs": "~0.8.4",<% } %><% if (filters.mongoose) { %>
1818
"mongoose": "~3.8.8",
19-
"mongoose-bird": "~0.0.1",<% } %><% if(filters.auth) { %>
19+
"mongoose-bird": "~0.0.1",<% } %><% if (filters.auth) { %>
2020
"jsonwebtoken": "^0.3.0",
2121
"express-jwt": "^0.1.3",
2222
"passport": "~0.2.0",
23-
"passport-local": "~0.1.6",<% } %><% if(filters.facebookAuth) { %>
24-
"passport-facebook": "latest",<% } %><% if(filters.twitterAuth) { %>
25-
"passport-twitter": "latest",<% } %><% if(filters.googleAuth) { %>
23+
"passport-local": "~0.1.6",<% } %><% if (filters.facebookAuth) { %>
24+
"passport-facebook": "latest",<% } %><% if (filters.twitterAuth) { %>
25+
"passport-twitter": "latest",<% } %><% if (filters.googleAuth) { %>
2626
"passport-google-oauth": "latest",<% } %>
2727
"composable-middleware": "^0.3.0",
28-
"connect-mongo": "^0.4.1"<% if(filters.socketio) { %>,
28+
"connect-mongo": "^0.4.1"<% if (filters.socketio) { %>,
2929
"socket.io": "^1.0.6",
3030
"socket.io-client": "^1.0.6",
3131
"socketio-jwt": "^2.0.2"<% } %>
@@ -43,9 +43,9 @@
4343
"grunt-contrib-imagemin": "~0.7.1",
4444
"grunt-contrib-jshint": "~0.10.0",
4545
"grunt-contrib-uglify": "~0.4.0",
46-
"grunt-contrib-watch": "~0.6.1",<% if(filters.coffee) { %>
47-
"grunt-contrib-coffee": "^0.10.1",<% } %><% if(filters.jade) { %>
48-
"grunt-contrib-jade": "^0.11.0",<% } %><% if(filters.less) { %>
46+
"grunt-contrib-watch": "~0.6.1",<% if (filters.coffee) { %>
47+
"grunt-contrib-coffee": "^0.10.1",<% } %><% if (filters.jade) { %>
48+
"grunt-contrib-jade": "^0.11.0",<% } %><% if (filters.less) { %>
4949
"grunt-contrib-less": "^0.11.4",<% } %>
5050
"grunt-google-cdn": "~0.4.0",
5151
"grunt-jscs": "~0.7.1",
@@ -62,8 +62,8 @@
6262
"grunt-protractor-runner": "^1.1.0",
6363
"grunt-asset-injector": "^0.1.0",
6464
"grunt-karma": "~0.8.2",
65-
"grunt-build-control": "DaftMonk/grunt-build-control",<% if(filters.sass) { %>
66-
"grunt-contrib-sass": "^0.7.3",<% } %><% if(filters.stylus) { %>
65+
"grunt-build-control": "DaftMonk/grunt-build-control",<% if (filters.sass) { %>
66+
"grunt-contrib-sass": "^0.7.3",<% } %><% if (filters.stylus) { %>
6767
"grunt-contrib-stylus": "latest",<% } %>
6868
"jit-grunt": "^0.5.0",
6969
"time-grunt": "~0.3.1",
@@ -76,9 +76,9 @@
7676
"grunt-mocha-istanbul": "^2.0.0",
7777
"chai-as-promised": "^4.1.1",
7878
"chai-things": "^0.2.0",
79-
"sinon-chai": "^2.5.0",<% if(filters.mocha) { %>
79+
"sinon-chai": "^2.5.0",<% if (filters.mocha) { %>
8080
"karma-mocha": "^0.1.9",
81-
"karma-chai-plugins": "^0.2.3",<% } if(filters.jasmine) { %>
81+
"karma-chai-plugins": "^0.2.3",<% } if (filters.jasmine) { %>
8282
"karma-jasmine": "~0.1.5",<% } %>
8383
"karma-ng-scenario": "~0.1.0",
8484
"karma-firefox-launcher": "~0.1.3",

app/templates/client/app/account(auth)/account(coffee).coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
angular.module '<%= scriptAppName %>'
4-
<% if(filters.ngroute) { %>.config ($routeProvider) ->
4+
<% if (filters.ngroute) { %>.config ($routeProvider) ->
55
$routeProvider
66
.when '/login',
77
templateUrl: 'app/account/login/login.html'
@@ -27,7 +27,7 @@ angular.module '<%= scriptAppName %>'
2727
.run ($rootScope) ->
2828
$rootScope.$on '$routeChangeStart', (event, next, current) ->
2929
next.referrer = current.originalPath if next.name is "logout" and current and current.originalPath and not current.authenticate
30-
<% } %><% if(filters.uirouter) { %>.config ($stateProvider) ->
30+
<% } %><% if (filters.uirouter) { %>.config ($stateProvider) ->
3131
$stateProvider
3232
.state 'login',
3333
url: '/login'

app/templates/client/app/account(auth)/account(js).js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
angular.module('<%= scriptAppName %>')
4-
<% if(filters.ngroute) { %>.config(function ($routeProvider) {
4+
<% if (filters.ngroute) { %>.config(function($routeProvider) {
55
$routeProvider
66
.when('/login', {
77
templateUrl: 'app/account/login/login.html',
@@ -35,7 +35,7 @@ angular.module('<%= scriptAppName %>')
3535
next.referrer = current.originalPath;
3636
}
3737
});
38-
});<% } %><% if(filters.uirouter) { %>.config(function ($stateProvider) {
38+
});<% } %><% if (filters.uirouter) { %>.config(function($stateProvider) {
3939
$stateProvider
4040
.state('login', {
4141
url: '/login',

app/templates/client/app/account(auth)/login/login(html).html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ <h1>Login</h1>
3737
<button class="btn btn-inverse btn-lg btn-login" type="submit">
3838
Login
3939
</button>
40-
<a class="btn btn-default btn-lg btn-register" <% if(filters.uirouter) { %>ui-sref="signup"<% } else { %>href="/signup"<% } %>>
40+
<a class="btn btn-default btn-lg btn-register" <% if (filters.uirouter) { %>ui-sref="signup"<% } else { %>href="/signup"<% } %>>
4141
Register
4242
</a>
4343
</div>
44-
<% if(filters.oauth) {%>
44+
<% if (filters.oauth) {%>
4545
<hr>
46-
<div><% if(filters.facebookAuth) {%>
46+
<div><% if (filters.facebookAuth) {%>
4747
<a class="btn btn-facebook" href="" ng-click="loginOauth('facebook')">
4848
<i class="fa fa-facebook"></i> Connect with Facebook
49-
</a><% } %><% if(filters.googleAuth) {%>
49+
</a><% } %><% if (filters.googleAuth) {%>
5050
<a class="btn btn-google-plus" href="" ng-click="loginOauth('google')">
5151
<i class="fa fa-google-plus"></i> Connect with Google+
52-
</a><% } %><% if(filters.twitterAuth) {%>
52+
</a><% } %><% if (filters.twitterAuth) {%>
5353
<a class="btn btn-twitter" href="" ng-click="loginOauth('twitter')">
5454
<i class="fa fa-twitter"></i> Connect with Twitter
5555
</a><% } %>

0 commit comments

Comments
 (0)