concat.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * `tasks/config/concat`
  3. *
  4. * ---------------------------------------------------------------
  5. *
  6. * An intermediate step to generate monolithic files that can
  7. * then be passed in to `uglify` and/or `cssmin` for minification.
  8. *
  9. * For more information, see:
  10. * https://sailsjs.com/anatomy/tasks/config/concat.js
  11. *
  12. */
  13. module.exports = function(grunt) {
  14. grunt.config.set('concat', {
  15. js: {
  16. src: require('../pipeline').jsFilesToInject,
  17. dest: '.tmp/public/concat/production.js'
  18. },
  19. css: {
  20. src: require('../pipeline').cssFilesToInject,
  21. dest: '.tmp/public/concat/production.css'
  22. }
  23. });
  24. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  25. // This Grunt plugin is part of the default asset pipeline in Sails,
  26. // so it's already been automatically loaded for you at this point.
  27. //
  28. // Of course, you can always remove this Grunt plugin altogether by
  29. // deleting this file. But check this out: you can also use your
  30. // _own_ custom version of this Grunt plugin.
  31. //
  32. // Here's how:
  33. //
  34. // 1. Install it as a local dependency of your Sails app:
  35. // ```
  36. // $ npm install grunt-contrib-concat --save-dev --save-exact
  37. // ```
  38. //
  39. //
  40. // 2. Then uncomment the following code:
  41. //
  42. // ```
  43. // // Load Grunt plugin from the node_modules/ folder.
  44. // grunt.loadNpmTasks('grunt-contrib-concat');
  45. // ```
  46. // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  47. };