Commit 5627ecdb authored by Mike Bostock's avatar Mike Bostock
Browse files

Allow load expression to be overridden.

parent fd1b42ca
......@@ -2,14 +2,21 @@ var smash = require("smash");
module.exports = function() {
var files = [].slice.call(arguments).map(function(d) { return "src/" + d; }),
expression = "d3",
sandbox = null;
files.unshift("src/start");
files.push("src/end");
function topic() {
smash.load(files, "d3", sandbox, this.callback);
smash.load(files, expression, sandbox, this.callback);
}
topic.expression = function(_) {
expression = _;
return topic;
};
topic.sandbox = function(_) {
sandbox = _;
return topic;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment