compress.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. module.exports = function(config) {
  2. return {
  3. zip: {
  4. options: {
  5. archive: '<%= destDir %>/<%= pkg.name %>-latest.zip'
  6. },
  7. files : [
  8. {
  9. expand: true,
  10. cwd: '<%= tempDir %>',
  11. src: ['**/*'],
  12. dest: '<%= pkg.name %>/',
  13. },
  14. {
  15. expand: true,
  16. dest: '<%= pkg.name %>/',
  17. src: ['LICENSE.md', 'README.md', 'NOTICE.md'],
  18. }
  19. ]
  20. },
  21. tgz: {
  22. options: {
  23. archive: '<%= destDir %>/<%= pkg.name %>-latest.tar.gz'
  24. },
  25. files : [
  26. {
  27. expand: true,
  28. cwd: '<%= tempDir %>',
  29. src: ['**/*'],
  30. dest: '<%= pkg.name %>/',
  31. },
  32. {
  33. expand: true,
  34. src: ['LICENSE.md', 'README.md', 'NOTICE.md'],
  35. dest: '<%= pkg.name %>/',
  36. }
  37. ]
  38. },
  39. zip_release: {
  40. options: {
  41. archive: '<%= destDir %>/<%= pkg.name %><%= modeOptions.zipSuffix %>-<%= pkg.version %>.zip'
  42. },
  43. files : [
  44. {
  45. expand: true,
  46. cwd: '<%= tempDir %>',
  47. src: ['**/*'],
  48. dest: '<%= pkg.name %>-<%= pkg.version %>/',
  49. },
  50. {
  51. expand: true,
  52. src: ['LICENSE.md', 'README.md', 'NOTICE.md'],
  53. dest: '<%= pkg.name %>-<%= pkg.version %>/',
  54. }
  55. ]
  56. },
  57. tgz_release: {
  58. options: {
  59. archive: '<%= destDir %>/<%= pkg.name %><%= modeOptions.zipSuffix %>-<%= pkg.version %>.tar.gz'
  60. },
  61. files : [
  62. {
  63. expand: true,
  64. cwd: '<%= tempDir %>',
  65. src: ['**/*'],
  66. dest: '<%= pkg.name %>-<%= pkg.version %>/',
  67. },
  68. {
  69. expand: true,
  70. src: ['LICENSE.md', 'README.md', 'NOTICE.md'],
  71. dest: '<%= pkg.name %>-<%= pkg.version %>/',
  72. }
  73. ]
  74. }
  75. };
  76. };