Created
July 10, 2013 20:50
-
-
Save vladikoff/5970204 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
grunt.registerTask('taskname', 'My awesome task', function () { | |
var done = this.async(); | |
// Epic hacks | |
var grunt = require('grunt'); | |
grunt.task.init = function() {}; | |
grunt.initConfig({ | |
compress: { | |
target: { | |
options: { | |
archive: '../app.zip' | |
}, | |
files: [ | |
{ src: ['**'] } | |
] | |
} | |
} | |
}); | |
// you might have to change this, this might be required for `loadNpmTasks` | |
var cwd = process.cwd(); | |
process.chdir(__dirname + '/..'); | |
grunt.loadNpmTasks('grunt-contrib-compress'); | |
process.chdir(cwd); | |
// Finally run the tasks, with options and a callback when we're done | |
grunt.tasks(['compress'], {}, function() { | |
// compress done running | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment