UNPKG
pug-runtime
Version:
canary (3.0.1-canary-10)
latest (3.0.1)
3.0.1
3.0.1-canary-10
3.0.0
3.0.0-canary-2
3.0.0-canary-1
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
0.0.0
The runtime components for the pug templating language
pugjs/pug
pug-runtime
/
wrap.js
11 lines
(9 loc)
•
237 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
runtime =
require
(
'./'
);
module
.
exports
= wrap;
function
wrap
(
template, templateName
) { templateName = templateName ||
'template'
;
return
Function
(
'pug'
, template +
'\n'
+
'return '
+ templateName +
';'
)(runtime); }