Last active
January 5, 2016 21:07
-
-
Save twolfson/4526992 to your computer and use it in GitHub Desktop.
Download and unzip Twitter Bootstrap in one fell swoop with grunt
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) { | |
// 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') | |
}; |
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-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": "[email protected]", | |
"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