sync.js 1.3 KB

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