Create a gist now

Instantly share code, notes, and snippets.

@twolfson /grunt.js
Last active Jan 5, 2016

What would you like to do?
Download and unzip Twitter Bootstrap in one fell swoop with grunt
module.exports = function (grunt) {
// Initial configuration
grunt.initConfig({
// Download external resources
curl: {
// Twitter Bootstrap
bootstrap: {
src: 'http://twitter.github.com/bootstrap/assets/bootstrap.zip',
dest: 'tmp/bootstrap.zip'
}
},
// Unzip resources
unzip: {
// Twitter Bootstrap
bootstrap: {
src: '<config:curl.bootstrap.dest>',
dest: 'public'
}
}
});
// Load in grunt-curl and grunt-zip
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-zip');
// Create a task to update Twitter Bootstrap
grunt.registerTask('update-bootstrap', 'curl:bootstrap unzip:bootstrap')
// Default task is to update Twitter Bootstrap
grunt.registerTask('default', 'update-bootstrap')
};
{
"name": "gist-4526992",
"description": "Download and unzip Twitter Bootstrap in one fell swoop with grunt",
"version": "0.1.0",
"homepage": "https://gist.github.com/4526992",
"author": {
"name": "Todd Wolfson",
"email": "todd@twolfson.com",
"url": "http://twolfson.com/"
},
"repository": {
"type": "git",
"url": "Download and unzip Twitter Bootstrap in one fell swoop with grunt"
},
"licenses": [
{
"type": "MIT",
"url": "/blob/master/LICENSE-MIT"
}
],
"main": "lib/gist-4526992",
"engines": {
"node": ">= 0.6.0"
},
"devDependencies": {
"grunt": "~0.3.17",
"grunt-curl": "~0.2.0",
"grunt-zip": "~0.2.0"
},
"keywords": [
"twitter",
"bootstrap",
"download",
"extract",
"automatic",
"grunt"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment