Compiles swig templates

npm install grunt-jp-swig
15 downloads in the last week
42 downloads in the last month

grunt-jp-swig Build Status

Swig templates compilation

Sample configuration:

"swig-browser": {

      // window.<namespace>
      namespace: 'SWIG',

      // see:
      templateSettings: {},

      // see:
      htmlMinifySettings: {},

      amd: false,

      // init as a parent template
      layout: false,

      prettify: false,

      // attach swig browser env to a template function
      processor: false, 

      // modify template function source code 
      processContent: function(src) { return src; },

      // modify template name
      processName: function(name) { return name; },

      // additional filter list 

    files:{ 'dest.js': ['templates/**/*.swig'] }

In browser:

  var html = window.SWIG[<template name>]({});
npm loves you