public
/
jst.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fce138
)
Make the root directory and current directory available as _root and _dirname
author
Nick Downing
<nick@ndcode.org>
Tue, 30 Oct 2018 01:13:10 +0000
(12:13 +1100)
committer
Nick Downing
<nick@ndcode.org>
Tue, 30 Oct 2018 07:54:35 +0000
(18:54 +1100)
js_template.js
patch
|
blob
|
history
diff --git
a/js_template.js
b/js_template.js
index
5dfcb1b
..
56b2e29
100644
(file)
--- a/
js_template.js
+++ b/
js_template.js
@@
-24,10
+24,12
@@
let js_template = async (root, dirname, pathname, args) => {
async result => {
dirname = path.posix.dirname(pathname)
- let arg_names = ['_require', '_html_escape']
+ let arg_names = ['_require', '_html_escape'
, '_root', '_dirname'
]
let arg_values = [
async pathname => js_template(root, dirname, pathname, args),
- html_escape
+ html_escape,
+ root,
+ dirname
]
if (args !== undefined)
for (let i in args)