Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save derekbasch/addf66846fcea0bdd25d to your computer and use it in GitHub Desktop.
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
sailsjs-v-0-10-x-inject-client-side-javascript-in-order
/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