Last active
August 29, 2015 14:02
-
-
Save derekbasch/addf66846fcea0bdd25d to your computer and use it in GitHub Desktop.
An example of how to inject a Javascript file in a specific order in Sails.js v0.10.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sailsjs-v-0-10-x-inject-client-side-javascript-in-order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tasks/pipeline.js | |
// Client-side javascript files to inject in order | |
// (uses Grunt-style wildcard/glob/splat expressions) | |
var jsFilesToInject = [ | |
// Dependencies like sails.io.js, jQuery, or Angular | |
// are brought in here | |
// Inject a specific file before the other dependencies. | |
// The duplicate file, captured with the wildcard below, will not be injected. | |
'js/dependencies/jquery-1.11.0.min.js', | |
'js/dependencies/**/*.js', | |
// All of the rest of your client-side js files | |
// will be injected here in no particular order. | |
//'js/**/*.js' | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment