compress.js 1.4 KB

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