Last active
December 19, 2015 17:38
-
-
Save twolfson/5992548 to your computer and use it in GitHub Desktop.
Proof of concept for https://github.com/twolfson/grunt-zip/issues/15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
dev/ | |
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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