pipeline.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * grunt/pipeline.js
  3. *
  4. * The order in which your css, javascript, and template files should be
  5. * compiled and linked from your views and static HTML files.
  6. *
  7. * (Note that you can take advantage of Grunt-style wildcard/glob/splat expressions
  8. * for matching multiple files.)
  9. */
  10. // CSS files to inject in order
  11. //
  12. // (if you're using LESS with the built-in default config, you'll want
  13. // to change `assets/styles/importer.less` instead.)
  14. var cssFilesToInject = [
  15. 'styles/**/*.css'
  16. ];
  17. // Client-side javascript files to inject in order
  18. // (uses Grunt-style wildcard/glob/splat expressions)
  19. var jsFilesToInject = [
  20. // Load sails.io before everything else
  21. 'js/dependencies/sails.io.js',
  22. // Dependencies like jQuery, or Angular are brought in here
  23. 'js/dependencies/**/*.js',
  24. // All of the rest of your client-side js files
  25. // will be injected here in no particular order.
  26. 'js/**/*.js'
  27. ];
  28. // Client-side HTML templates are injected using the sources below
  29. // The ordering of these templates shouldn't matter.
  30. // (uses Grunt-style wildcard/glob/splat expressions)
  31. //
  32. // By default, Sails uses JST templates and precompiles them into
  33. // functions for you. If you want to use jade, handlebars, dust, etc.,
  34. // with the linker, no problem-- you'll just want to make sure the precompiled
  35. // templates get spit out to the same file. Be sure and check out `tasks/README.md`
  36. // for information on customizing and installing new tasks.
  37. var templateFilesToInject = [
  38. 'templates/**/*.html'
  39. ];
  40. // Prefix relative paths to source files so they point to the proper locations
  41. // (i.e. where the other Grunt tasks spit them out, or in some cases, where
  42. // they reside in the first place)
  43. module.exports.cssFilesToInject = cssFilesToInject.map(function(path) {
  44. return '.tmp/public/' + path;
  45. });
  46. module.exports.jsFilesToInject = jsFilesToInject.map(function(path) {
  47. return '.tmp/public/' + path;
  48. });
  49. module.exports.templateFilesToInject = templateFilesToInject.map(function(path) {
  50. return 'assets/' + path;
  51. });