scrat-swig
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -58,4 +58,9 @@ 'use strict' | ||
Resource.prototype.loadOptions = function(path){ | ||
var content = fs.readFileSync(path) | ||
var options = JSON.parse(content) | ||
var options | ||
if(typeof path === 'object'){ | ||
options = path | ||
} else { | ||
var content = fs.readFileSync(path) | ||
options = JSON.parse(content) | ||
} | ||
this.setOptions(options) | ||
@@ -62,0 +67,0 @@ } |
{ | ||
"name": "scrat-swig", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Extensions of swig for scrat", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,3 +16,3 @@ exports.compile = function(compiler, args, content, parents, options, blockName) { | ||
return [ | ||
'_ctx._res = new _ctx._Resource(_ctx._map);', | ||
'_ctx._res = new _swig.Resource(_ctx._map);', | ||
'_ctx._res.pagelet(_ctx.pagelets);', | ||
@@ -19,0 +19,0 @@ '_output += "<html ' + (attrs.join(' ').replace(/"/g, "\\\"")) + '>";', |
12923
477