buildProd.js 757 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * `tasks/register/buildProd.js`
  3. *
  4. * ---------------------------------------------------------------
  5. *
  6. * This Grunt tasklist will be executed instead of `build` if you
  7. * run `sails www` in a production environment, e.g.:
  8. * `NODE_ENV=production sails www`
  9. *
  10. * For more information see:
  11. * https://sailsjs.com/anatomy/tasks/register/build-prod.js
  12. *
  13. */
  14. module.exports = function(grunt) {
  15. grunt.registerTask('buildProd', [
  16. 'polyfill:prod', //« Remove this to skip transpilation in production (not recommended)
  17. 'compileAssets',
  18. 'babel', //« Remove this to skip transpilation in production (not recommended)
  19. 'concat',
  20. 'uglify',
  21. 'cssmin',
  22. 'linkAssetsBuildProd',
  23. 'clean:build',
  24. 'copy:build'
  25. ]);
  26. };