Skip to content

Commit bc1e68e

Browse files
committed
fix(app): conditional include of jquery
Fixes #362
1 parent a0f16e2 commit bc1e68e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var Generator = module.exports = function Generator(args, options) {
99
yeoman.generators.Base.apply(this, arguments);
1010
this.argument('appname', { type: String, required: false });
1111
this.appname = this.appname || path.basename(process.cwd());
12-
this.indexFile = this.engine(this.read('../../templates/common/index.html'),
13-
this);
1412

1513
args = ['main'];
1614

@@ -130,6 +128,10 @@ Generator.prototype.askForModules = function askForModules() {
130128
}.bind(this));
131129
};
132130

131+
Generator.prototype.readIndex = function readIndex() {
132+
this.indexFile = this.engine(this.read('../../templates/common/index.html'), this);
133+
};
134+
133135
// Waiting a more flexible solution for #138
134136
Generator.prototype.bootstrapFiles = function bootstrapFiles() {
135137
var sass = this.compassBootstrap;

templates/common/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
ga('send', 'pageview');
3636
</script>
3737

38-
<script src="bower_components/jquery/jquery.js"></script>
38+
<% if (bootstrap) { %><script src="bower_components/jquery/jquery.js"></script><% } %>
3939
<script src="bower_components/angular/angular.js"></script>
4040
</body>
4141
</html>

0 commit comments

Comments
 (0)