Skip to content

Commit 9919b2d

Browse files
committed
fix(app): order of script inclusions
Plugins should be loaded before the application JS. Fixes #278
1 parent 2c45800 commit 9919b2d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ Generator.prototype.extraModules = function extraModules() {
205205
}
206206
};
207207

208+
Generator.prototype.appJs = function appJs() {
209+
this.indexFile = this.appendFiles({
210+
html: this.indexFile,
211+
fileType: 'js',
212+
optimizedPath: 'scripts/scripts.js',
213+
sourceFileList: ['scripts/app.js', 'scripts/controllers/main.js'],
214+
searchPath: ['.tmp', 'app']
215+
});
216+
};
217+
208218
Generator.prototype.createIndexHtml = function createIndexHtml() {
209219
this.write(path.join(this.appPath, 'index.html'), this.indexFile);
210220
};

templates/common/index.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,5 @@
3434

3535
<script src="bower_components/jquery/jquery.js"></script>
3636
<script src="bower_components/angular/angular.js"></script>
37-
38-
<!-- build:js({.tmp,app}) scripts/scripts.js -->
39-
<script src="scripts/app.js"></script>
40-
<script src="scripts/controllers/main.js"></script>
41-
<!-- endbuild -->
4237
</body>
4338
</html>

0 commit comments

Comments
 (0)