mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: added builder.requireResolve(...)
This commit is contained in:
parent
3eb9084a2c
commit
d1fcc2f983
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user