mattmccray / liquid.js

JavaScript port of Tobias Luetke's Liquid template engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use it with Rhino, SpiderMonkey, Node?

zanona opened this issue · comments

Hi, is it possible at the moment run liquidjs with one of those 3 javascript engines, it keeps returning an error when mentioning Class.create

Ah, that's a good question. I would definitely like for it to work in Node. But I really haven't had the time to look into yet.

You might be able to try pulling in https://github.com/rixius/prototype.node.js (npm install prototype), but I haven't tried it.

I've just created a branch in my own fork to get this working with Nodes require thingies.

I don't know if its strictly correct for Node but my use case is requiring modules and then running it all through browserify to be able to use this in the browser. It seems to be working.

Uh, I dunno. Theres some kind of magic, ...thing, involved.

I can do a pull request if you want?
It's just a package.json in the root and a module.exports = Liquid; at the bottom of core.js.

Nice. Yeah, if you create a PR for that, I'd be happy to merge it.

Merged the PR. Considering this closed.