cssmin.js 1.4 KB

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