Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Twitter's bootstrap toolkit #34

Merged
merged 3 commits into from

2 participants

@rricard

I just wanted support for bootstrap in asset.

You can now require bootstrap and bootstrap-less (the less source version) in your project !

assets.json
@@ -17,6 +17,29 @@
],
"version": "1.0"
},
+ "bootstrap": {
+ "url": "https://github.com/twitter/bootstrap/raw/master/bootstrap-1.1.1.css",
@tj Owner
tj added a note

not sure if you want to add {version} in there

@tj Owner
tj added a note

but cool :D thanks

@rricard
rricard added a note

I've already tried this in fact :
https://github.com/twitter/bootstrap/raw/v{version}/bootstrap-{version}.css

But it downloads and calls the file bootstrap-{version}.css in my public folder ...

Maybe I can try to modify this behavior. I'll see it later

@tj Owner
tj added a note

ohhhh I probably have a bug doing one replace only, I'll fix that then, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rricard

I've fixed the {version} bug. Now, everything seems to be ok !

@tj tj merged commit f82b2c3 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 25 additions and 1 deletion.
  1. +23 −0 assets.json
  2. +2 −1  lib/installer.js
View
23 assets.json
@@ -17,6 +17,29 @@
],
"version": "1.0"
},
+ "bootstrap": {
+ "url": "https://github.com/twitter/bootstrap/raw/v{version}/bootstrap-{version}.css",
+ "compressed": "bootstrap-{version}.min.css",
+ "description": "CSS toolkit from Twitter",
+ "tags": ["css", "twitter"],
+ "version": "1.1.1"
+ },
+ "bootstrap-less": {
+ "base": "https://github.com/twitter/bootstrap/raw/v{version}",
+ "description": "CSS toolkit from Twitter (LESS Source)",
+ "tags": ["css", "twitter", "less"],
+ "files": [
+ "lib/bootstrap.less",
+ "lib/forms.less",
+ "lib/patterns.less",
+ "lib/preboot.less",
+ "lib/reset.less",
+ "lib/scaffolding.less",
+ "lib/tables.less",
+ "lib/type.less"
+ ],
+ "version": "1.1.1"
+ },
"eventemitter2": {
"url": "https://github.com/hij1nx/EventEmitter2/blob/v{version}/lib/eventemitter2.js",
"description": "nodejs-style event emitter with namespaces, wildcards, TTL etc",
View
3  lib/installer.js
@@ -190,7 +190,8 @@ Installer.prototype.download = function(asset, path){
var self = this
, version = asset.version
, url = asset.entry[asset.compress ? 'compressed' : 'url'] || asset.entry.url
- , url = url.replace(/\{version\}/g, version);
+ , url = url.replace(/\{version\}/g, version)
+ , path = path.replace(/\{version\}/g, version);
// compressed
if (asset.compress && asset.entry.compressed) {
Something went wrong with that request. Please try again.