Skip to content

Commit

Permalink
Add wrapper for die.
Browse files Browse the repository at this point in the history
  • Loading branch information
zeekay committed Sep 3, 2012
1 parent 320b75d commit 8f10174
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 21 deletions.
39 changes: 39 additions & 0 deletions index.js
@@ -0,0 +1,39 @@
var compiled = null;

module.exports = function(opts, cb) {
if (typeof opts == 'function') {
cb = opts;
opts = {};
}

var path = require('path'),
recess = require('recess'),
bootstrapSrc = path.resolve(__dirname + '/less/bootstrap.less'),
responsiveSrc = path.resolve(__dirname + '/less/responsive.less');

if (compiled) {
return cb(null, compiled);
}

recess(bootstrapSrc, {compile: true}, function(err, obj) {
if (err) {
return cb(err);
}

compiled = obj.output;

if (opts.responsive) {
recess(responsiveSrc, {compile: true}, function(err, obj) {
if (err) {
return cb(err);
}

compiled += obj.output;

cb(null, compiled);
});
} else {
cb(null, compiled);
}
});
};
56 changes: 35 additions & 21 deletions package.json
@@ -1,25 +1,39 @@
{
"name": "bootstrap"
, "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development."
, "version": "2.1.0"
, "keywords": ["bootstrap", "css"]
, "homepage": "http://twitter.github.com/bootstrap/"
, "author": "Twitter Inc."
, "scripts": { "test": "make test" }
, "repository": {
"type": "git"
, "url": "https://github.com/twitter/bootstrap.git"
}
, "licenses": [
"name": "die-bootstrap",
"description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.",
"version": "2.1.0",
"keywords": [
"bootstrap",
"css",
"die"
],
"homepage": "https://github.com/zeekay/die-bootstrap",
"author": {
"name": "Zach Kelling",
"email": "zeekayy@gmail.com",
"url": "http://whatit.is"
},
"main": "index.js",
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "https://github.com/zeekay/die-bootstrap"
},
"licenses": [
{
"type": "Apache-2.0"
, "url": "http://www.apache.org/licenses/LICENSE-2.0"
"type": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
]
, "devDependencies": {
"uglify-js": "1.2.6"
, "jshint": "0.6.1"
, "recess": "1.0.3"
, "connect": "2.1.3"
],
"devDependencies": {
"uglify-js": "1.2.6",
"jshint": "0.6.1",
"recess": "1.0.3",
"connect": "2.1.3"
},
"dependencies": {
"recess": "~1.1.6"
}
}
}

0 comments on commit 8f10174

Please sign in to comment.