Omri Aharon
Omri Aharon

Reputation: 17064

Karma - Load Files From Directories First

My karma files config:

files: [
    ...
    app/scripts/**/*.js
    ...
],

I have 4 directories under scripts directory, and app.js.

I need the app.js to be loaded last (since it depends on other scripts).

Any way to ensure this?

Upvotes: 1

Views: 58

Answers (1)

Magomogo
Magomogo

Reputation: 954

You can use negation like this:

files: [
    'app/scripts/**/!(app).js',
    'app/scripts/app.js'
],

This makes app.js to be loaded at the end.

Upvotes: 1

Related Questions