Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including deep-swig with all npm packages installed. Try it out:

var deepSwig = require("deep-swig")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

deep-swig v0.5.5

swigjs (templating) related stuffs (store, protocol, utils...) for deepjs

deep-swig

deep-swig provides deepjs styled client for swigjs (template engine) http://paularmstrong.github.io/swig/

Install

npm install deep-swig

or

bower install deep-swig

Usage

// example through deepLoad

require("deep-swig")();
require("deep-node/lib/rest/file/json")();

var obj = {
    template:"swig::./path/to/my/swig/template",
    context:{
        myData:"json::./path/to/datas.json",
        myTitle:"Hello world"
    }
};

deep.nodes(obj)
.deepLoad()
.done(function(obj){
    return obj.template(obj.context);
})
.log();
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free