Gruntfile.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = function(grunt){
  2. grunt.initConfig({
  3. gitclone: {
  4. fontawesome: {
  5. options: {
  6. repository: 'https://github.com/FortAwesome/Font-Awesome.git',
  7. directory: 'tmp/fontawesome'
  8. },
  9. },
  10. fancybox: {
  11. options: {
  12. repository: 'https://github.com/fancyapps/fancyBox.git',
  13. directory: 'tmp/fancybox'
  14. }
  15. }
  16. },
  17. copy: {
  18. fontawesome: {
  19. expand: true,
  20. cwd: 'tmp/fontawesome/fonts/',
  21. src: ['**'],
  22. dest: 'source/css/fonts/'
  23. },
  24. fancybox: {
  25. expand: true,
  26. cwd: 'tmp/fancybox/source/',
  27. src: ['**'],
  28. dest: 'source/fancybox/'
  29. }
  30. },
  31. _clean: {
  32. tmp: ['tmp'],
  33. fontawesome: ['source/css/fonts'],
  34. fancybox: ['source/fancybox']
  35. }
  36. });
  37. require('load-grunt-tasks')(grunt);
  38. grunt.renameTask('clean', '_clean');
  39. grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']);
  40. grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']);
  41. grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']);
  42. grunt.registerTask('clean', ['_clean']);
  43. };