copy.js 812 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copy files and folders.
  3. *
  4. * ---------------------------------------------------------------
  5. *
  6. * # dev task config
  7. * Copies all directories and files, exept coffescript and less fiels, from the sails
  8. * assets folder into the .tmp/public directory.
  9. *
  10. * # build task config
  11. * Copies all directories nd files from the .tmp/public directory into a www directory.
  12. *
  13. * For usage docs see:
  14. * https://github.com/gruntjs/grunt-contrib-copy
  15. */
  16. module.exports = function(grunt) {
  17. grunt.config.set('copy', {
  18. dev: {
  19. files: [{
  20. expand: true,
  21. cwd: './assets',
  22. src: ['**/*.!(coffee|less)'],
  23. dest: '.tmp/public'
  24. }]
  25. },
  26. build: {
  27. files: [{
  28. expand: true,
  29. cwd: '.tmp/public',
  30. src: ['**/*'],
  31. dest: 'www'
  32. }]
  33. }
  34. });
  35. grunt.loadNpmTasks('grunt-contrib-copy');
  36. };