4 ms·
Thanks for making this also work in nodejs. I've tried Mustache and hamljs, and I'll have to give your code a whirl as well. (btw: Is it possible to call withi
by Maciek416 17y ago
Thanks for making this also work in nodejs. I've tried Mustache and hamljs, and I'll have to give your code a whirl as well.
(btw: Is it possible to call within a namespace, i.e. pjs.DIV( .. ), as opposed to DIV(..) ? Your examples seem to export the tags and forEach as globals).
- saroskar 17y agoYes, if you use PaJes-CommonJS.js you can use use namespace by using standard require() construct. For example, var pjs = require('PaJes-CommonJS'); pjs.DIV(pjs.forEach(...)); This requires CommonJS module system to be in place (that is, function require() being implemented to be specific). Alternatively, it would be trivial to make non-CommonJS use namespace too by modifying PaJes.js. Do you need namespace in non-CommonJs setting? Thanks for trying it out!