Marko v3: added builder.requireResolve(...)

This commit is contained in:
Patrick Steele-Idem 2016-02-09 15:18:15 -07:00
parent 3eb9084a2c
commit d1fcc2f983

View File

@ -394,6 +394,18 @@ class Builder {
return new FunctionCall({callee, args});
}
requireResolve(path) {
path = makeNode(path);
let callee = new MemberExpression({
object: new Identifier({name: 'require'}),
property: new Identifier({name: 'resolve'})
});
let args = [ path ];
return new FunctionCall({callee, args});
}
returnStatement(argument) {
argument = makeNode(argument);