Skip to content

Instantly share code, notes, and snippets.

@twolfson
Last active December 19, 2015 17:38
Show Gist options
  • Save twolfson/5992548 to your computer and use it in GitHub Desktop.
Save twolfson/5992548 to your computer and use it in GitHub Desktop.
node_modules/
dev/
dist/
module.exports = function (grunt) {
// Write out files to zip
grunt.file.write('dev/index.html', 'hello');
grunt.file.write('dev/style/style.css', 'world');
// Set up grunt config
grunt.initConfig({
zip : {
app : {
cwd: 'dev/',
src : ['dev/**/*'],
dest : 'dist/dev.zip'
}
}
});
// Load in grunt-zop
grunt.loadNpmTasks('grunt-zip');
// By default, run `zip` task
grunt.registerTask('default', ['zip']);
};
{
"name": "gist-grunt-zip-poc",
"version": "0.1.0",
"description": "",
"main": "Gruntfile.js",
"repository": {
"type": "git",
"url": "https://gist.github.com/5992548.git"
},
"author": "Todd Wolfson <todd@twolfson.com>",
"license": "MIT",
"devDependencies": {
"grunt-zip": "~0.9.2",
"grunt": "~0.4.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment