My Karma configuration currently has the following files:
files: [
'vendor/vendor.js',
'vendor/angular-mocks/angular-mocks.js',
'src/components/security/index.js',
'src/components/security/authentication.js',
'src/components/security/login-controller.js',
'src/components/filters/index.js',
'src/components/filters/toDate.js',
'src/components/services/index.js',
'src/components/services/alert.js',
'src/menu/index.js',
'src/menu/menu-controller.js',
'src/user/index.js',
'src/manage/index.js',
'src/manage/user/manage-user-controller.js',
'src/manage/channel/manage-channel-controller.js',
'src/stream/index.js',
'src/stream/stream-controller.js',
'src/messages/index.js',
'src/messages/messages-controller.js',
'src/app.js',
'src/**/*.spec.js'
],
The file is vendor/vendor.jsautomatically created by the Gulp task, which combines all the provider files using my bower setting. This is all my own Javascript code, which is so hard to include because ordering matters a lot. The files index.jsin the folder define the module (and its routes) and therefore must be loaded before individual files. And app.jsalways should be the last.
So my question is, how am I doing this a little smarter, for example with glob, which first includes all the files index.js, and then all the rest?
source
share