Comparing version 0.1.0 to 0.1.1
@@ -33,5 +33,8 @@ var fs = require('fs') | ||
* config.compress -- compressed output file location (if given) | ||
* config.exposeRequire -- if true, require() will be exported to the global scope | ||
*/ | ||
exports.build = function(config) { | ||
config = object.extend({header: '', compress: ''}, config) | ||
config = object.extend({ | ||
header: '', compress: '', exposeRequire: false | ||
}, config) | ||
@@ -55,2 +58,5 @@ // Input | ||
} | ||
if (config.exposeRequire) { | ||
exported.push("window['require'] = require") | ||
} | ||
@@ -57,0 +63,0 @@ // Output |
{ | ||
"name": "buildumb", | ||
"description": "Ultra-dumb exporter of Node.js modules for use in the browser", | ||
"version": "0.1.0", | ||
"author": "Jonathan Buchanan <jonathan.buchanan@gmail.com> (https://github.com/insin)", | ||
"tags": ["build", "export", "browser", "modules"], | ||
"main": "./lib/buildumb", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/insin/buildumb.git" | ||
}, | ||
"dependencies": { | ||
"isomorph": "0.1.x", | ||
"request": "2.9.x" | ||
"name": "buildumb" | ||
, "description": "Ultra-dumb exporter of Node.js modules for use in the browser" | ||
, "version": "0.1.1" | ||
, "author": "Jonathan Buchanan <jonathan.buchanan@gmail.com> (https://github.com/insin)" | ||
, "tags": ["build", "export", "browser", "modules"] | ||
, "main": "./lib/buildumb" | ||
, "repository": { | ||
"type": "git" | ||
, "url": "http://github.com/insin/buildumb.git" | ||
} | ||
, "dependencies": { | ||
"isomorph": "0.1.x" | ||
, "request": "2.9.x" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
7043
6
123
55