Skip to content

Commit

Permalink
Merge pull request #80 from aaronmcox/zip-with-compression
Browse files Browse the repository at this point in the history
Zip with compression
  • Loading branch information
zutrinken committed Nov 15, 2019
2 parents e1ba372 + 8060f84 commit b3e82b9
Show file tree
Hide file tree
Showing 4 changed files with 541 additions and 48 deletions.
40 changes: 23 additions & 17 deletions Gruntfile.js
Expand Up @@ -78,23 +78,29 @@ module.exports = function(grunt) {
tasks: ['sass:dev', 'copy:dev', 'postcss:dev'] tasks: ['sass:dev', 'copy:dev', 'postcss:dev']
} }
}, },
zip: { compress: {
dist: { main: {
src: [ options: {
'**', archive: `dist/${require('./package.json').name}.zip`,
'!node_modules', level: 9
'!node_modules/**', },
'!src', files: [{
'!src/**', src: [
'!dist', '**',
'!dist/**', '!node_modules',
'!.git', '!node_modules/**',
'!.gitignore', '!src',
'!Gruntfile.js', '!src/**',
'!package-lock.json' '!dist',
], '!dist/**',
dest: `dist/${require('./package.json').name}.zip` '!.git',
} '!.gitignore',
'!Gruntfile.js',
'!package-lock.json'
],
dest: '.'}
]
},
} }
}); });


Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -57,9 +57,9 @@ Build Grunt project:


grunt build grunt build


The zip Grunt task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site. The compress Grunt task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.


grunt zip grunt compress


## Copyright & License ## Copyright & License


Expand Down

0 comments on commit b3e82b9

Please sign in to comment.