Skip to content

Commit 0aca9b5

Browse files
committed
Merge branch 'master' into pr/344
Conflicts: app/templates/_bower.json app/templates/_package.json
2 parents 1b90c44 + 8df4901 commit 0aca9b5

27 files changed

+209
-83
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ module.exports = function (grunt) {
5656
}, grunt.task.current.async());
5757
});
5858

59-
grunt.registerTask('default', ['bump', 'changelog', 'stage', 'release']);
59+
//grunt.registerTask('default', ['bump', 'changelog', 'stage', 'release']);
6060
};

app/index.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
2222
this.scriptAppName = this.appname + genUtils.appName(this);
2323
this.appPath = this.env.options.appPath;
2424
this.pkg = require('../package.json');
25+
2526
this.filters = {};
2627
},
2728

@@ -87,12 +88,25 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
8788
message: "What Angular router would you like to use?",
8889
choices: [ "ngRoute", "uiRouter"],
8990
filter: function( val ) { return val.toLowerCase(); }
91+
}, {
92+
type: "confirm",
93+
name: "bootstrap",
94+
message: "Would you like to include Bootstrap?"
95+
}, {
96+
type: "confirm",
97+
name: "uibootstrap",
98+
message: "Would you like to include UI Bootstrap?",
99+
when: function (answers) {
100+
return answers.bootstrap;
101+
}
90102
}], function (answers) {
91103
this.filters[answers.script] = true;
92104
this.filters[answers.markup] = true;
93105
this.filters[answers.stylesheet] = true;
94106
this.filters[answers.router] = true;
95-
cb();
107+
this.filters['bootstrap'] = answers.bootstrap;
108+
this.filters['uibootstrap'] = answers.uibootstrap;
109+
cb();
96110
}.bind(this));
97111
},
98112

@@ -206,16 +220,20 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
206220
},
207221

208222
ngModules: function() {
209-
this.filters = this.config.get('filters');
223+
this.filters = this._.defaults(this.config.get('filters'), {
224+
bootstrap: true,
225+
uibootstrap: true
226+
});
227+
210228
var angModules = [
211229
"'ngCookies'",
212230
"'ngResource'",
213-
"'ngSanitize'",
214-
"'ui.bootstrap'"
231+
"'ngSanitize'"
215232
];
216233
if(this.filters['ngroute']) angModules.push("'ngRoute'");
217234
if(this.filters['socketio']) angModules.push("'btford.socket-io'");
218235
if(this.filters['uirouter']) angModules.push("'ui.router'");
236+
if(this.filters['uibootstrap']) angModules.push("'ui.bootstrap'");
219237

220238
this.angularModules = "\n " + angModules.join(",\n ") +"\n";
221239
},

app/templates/Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ module.exports = function (grunt) {
244244
target: {
245245
src: '<%%= yeoman.client %>/index.html',
246246
ignorePath: '<%%= yeoman.client %>/',
247-
exclude: [/bootstrap-sass-official/, /bootstrap.js/<% if(!filters.css) { %>, /bootstrap.css/, /font-awesome.css/ <% } %>]
247+
exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/'<% if(!filters.css) { %>, /bootstrap.css/, /font-awesome.css/ <% } %>]
248248
}
249249
},
250250

app/templates/_bower.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"angular": ">=1.2.*",
66
"json3": "~3.3.1",
77
"es5-shim": "~3.0.1",
8-
"jquery": "~1.11.0",<% if(filters.sass) { %>
9-
"bootstrap-sass-official": "~3.1.1",<% } %><% if(filters.stylus) { %>
10-
"bootstrap-stylus": "latest",<% } %>
11-
"bootstrap": "~3.1.1",
8+
"jquery": "~1.11.0",<% if(filters.bootstrap) { %><% if (filters.sass) { %>
9+
"bootstrap-sass-official": "~3.1.1",<% } %>
10+
"bootstrap": "~3.1.1",<% } %>
1211
"angular-resource": ">=1.2.*",
1312
"angular-cookies": ">=1.2.*",
1413
"angular-sanitize": ">=1.2.*",<% if(filters.ngroute) { %>
15-
"angular-route": ">=1.2.*",<% } %>
16-
"angular-bootstrap": "~0.11.0",
14+
"angular-route": ">=1.2.*",<% } %><% if(filters.uibootstrap) { %>
15+
"angular-bootstrap": "~0.11.0",<% } %>
1716
"font-awesome": ">=4.1.0",
1817
"lodash": "~2.4.1"<% if(filters.socketio) { %>,
1918
"angular-socket-io": "~0.6.0"<% } %><% if(filters.uirouter) { %>,

app/templates/_package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
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) { %>
15+
"lodash": "~2.4.1",<% if(filters.jade) { %>
16+
"jade": "~1.2.0",<% } %><% if(filters.html) { %>
1717
"ejs": "~0.8.4",<% } %><% if(filters.mongoose) { %>
1818
"mongoose": "~3.8.8",<% } %><% if(filters.auth) { %>
1919
"jsonwebtoken": "^0.3.0",
@@ -24,28 +24,27 @@
2424
"passport-twitter": "latest",<% } %><% if(filters.googleAuth) { %>
2525
"passport-google-oauth": "latest",<% } %>
2626
"composable-middleware": "^0.3.0",
27-
"connect-mongo": "^0.4.1",
28-
"socket.io": "~0.9.16",
29-
"socketio-jwt": "^2.0.2"
27+
"connect-mongo": "^0.4.1"<% if(filters.socketio) { %>,
28+
"socket.io": "~1.0.6",
29+
"socketio-jwt": "^2.0.2"<% } %>
3030
},
3131
"devDependencies": {
3232
"grunt": "~0.4.4",
3333
"grunt-autoprefixer": "~0.7.2",
3434
"grunt-bower-install": "~1.4.0",
3535
"grunt-concurrent": "~0.5.0",
3636
"grunt-contrib-clean": "~0.5.0",
37-
"grunt-contrib-compass": "~0.7.2",
3837
"grunt-contrib-concat": "~0.4.0",
3938
"grunt-contrib-copy": "~0.5.0",
4039
"grunt-contrib-cssmin": "~0.9.0",
4140
"grunt-contrib-htmlmin": "~0.2.0",
4241
"grunt-contrib-imagemin": "~0.7.1",
4342
"grunt-contrib-jshint": "~0.10.0",
4443
"grunt-contrib-uglify": "~0.4.0",
45-
"grunt-contrib-watch": "~0.6.1",
46-
"grunt-contrib-coffee": "^0.10.1",
47-
"grunt-contrib-jade": "^0.11.0",
48-
"grunt-contrib-less": "^0.11.0",
44+
"grunt-contrib-watch": "~0.6.1",<% if(filters.coffee) { %>
45+
"grunt-contrib-coffee": "^0.10.1",<% } %><% if(filters.jade) { %>
46+
"grunt-contrib-jade": "^0.11.0",<% } %><% if(filters.less) { %>
47+
"grunt-contrib-less": "^0.11.0",<% } %>
4948
"grunt-google-cdn": "~0.4.0",
5049
"grunt-newer": "~0.7.0",
5150
"grunt-ngmin": "~0.0.3",

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ angular.module('<%= scriptAppName %>')
1313
)
1414
.when('/settings',
1515
templateUrl: 'app/account/settings/settings.html'
16-
controller: 'SettingsCtrl'
16+
controller: 'SettingsCtrl',
17+
authenticate: true
1718
)<% } %><% if(filters.uirouter) { %>.config ($stateProvider) ->
1819
$stateProvider
1920
.state('login',
@@ -29,5 +30,6 @@ angular.module('<%= scriptAppName %>')
2930
.state('settings',
3031
url: '/settings',
3132
templateUrl: 'app/account/settings/settings.html'
32-
controller: 'SettingsCtrl'
33+
controller: 'SettingsCtrl',
34+
authenticate: true
3335
)<% } %>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ angular.module('<%= scriptAppName %>')
3131
.state('settings', {
3232
url: '/settings',
3333
templateUrl: 'app/account/settings/settings.html',
34-
controller: 'SettingsCtrl'
34+
controller: 'SettingsCtrl',
35+
authenticate: true
3536
});
3637
});<% } %>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<% if(filters.bootstrap) { %>
12
// Colors
23
// --------------------------------------------------
34

@@ -34,4 +35,4 @@
3435

3536
.btn-google-plus {
3637
.button-variant(@btnText; @btnGooglePlusBackground; @btnGooglePlusBackgroundHighlight);
37-
}
38+
}<% } %>

app/templates/client/app/account(auth)/login/login(sass).scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<% if(filters.bootstrap) { %>
12
// Colors
23
// --------------------------------------------------
34

@@ -34,4 +35,4 @@ $btnGooglePlusBackgroundHighlight: #c53727;
3435

3536
.btn-google-plus {
3637
@include button-variant($btnText, $btnGooglePlusBackground, $btnGooglePlusBackgroundHighlight);
37-
}
38+
}<% } %>

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,22 @@ <h1>Sign up</h1>
6262
Login
6363
</a>
6464
</div>
65+
66+
<% if(filters.facebookAuth || filters.twitterAuth || filters.googleAuth) {%>
67+
<hr>
68+
<div><% if(filters.facebookAuth) {%>
69+
<a class="btn btn-facebook" href="" ng-click="loginOauth('facebook')">
70+
<i class="fa fa-facebook"></i> Connect with Facebook
71+
</a><% } %><% if(filters.googleAuth) {%>
72+
<a class="btn btn-google-plus" href="" ng-click="loginOauth('google')">
73+
<i class="fa fa-google-plus"></i> Connect with Google+
74+
</a><% } %><% if(filters.twitterAuth) {%>
75+
<a class="btn btn-twitter" href="" ng-click="loginOauth('twitter')">
76+
<i class="fa fa-twitter"></i> Connect with Twitter
77+
</a><% } %>
78+
</div><% } %>
6579
</form>
6680
</div>
6781
</div>
68-
</div>
82+
<hr>
83+
</div>

0 commit comments

Comments
 (0)