Comparing version 0.0.2 to 0.1.0
@@ -1,1 +0,1 @@ | ||
module.exports = require("./lib/tinytim") | ||
module.exports = require("./lib/index") |
@@ -53,3 +53,2 @@ /*! | ||
if (lookup === undef){ | ||
console.error('undef',path[i]) | ||
throw new Error("tim: '" + path[i] + "' not found in " + tag); | ||
@@ -56,0 +55,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://github.com/baryon/node-tinytim", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"author": "LI Long <lilong@gmail.com>", | ||
@@ -16,3 +16,3 @@ "contributors": [ | ||
}, | ||
"main": "./lib/tinytim", | ||
"main": "./lib/index", | ||
"keywords": ["template", "micro template", "tim"], | ||
@@ -19,0 +19,0 @@ "scripts": { "test": "expresso test/*" }, |
@@ -21,5 +21,23 @@ #tinytim for node.js [![Build Status](https://secure.travis-ci.org/baryon/node-tinytim.png)](http://travis-ci.org/baryon/node-tinytim) | ||
See [test/test.js](https://github.com/baryon/node-tinytim/blob/master/test/test.js) for example | ||
See [test/test.js](https://github.com/baryon/node-tinytim/blob/master/test/test.js) as example | ||
and support render and renderFile methods. | ||
See [test/render.js](https://github.com/baryon/node-tinytim/blob/master/test/render.js) and [test/renderFile.js](https://github.com/baryon/node-tinytim/blob/master/test/renderFile.js) for details. | ||
```javascript | ||
var tinytim = require('tinytim'); | ||
var result = tinytim.render("Hello {{place}}", {place: "world"}); | ||
console.log(result); // Hello world | ||
``` | ||
```javascript | ||
var tinytim = require('tinytim'); | ||
var result1 = tinytim.renderFile("./hello.tim", {place: "world"}); | ||
console.log(result1); // Hello world | ||
var result2 = tinytim.renderFile("./hello.tim", {place: "world"}, true); //use cache to render | ||
console.log(result2); // Hello world | ||
``` | ||
# Tim | ||
@@ -153,2 +171,6 @@ | ||
### 0.1.0 | ||
* support render and renderFile methods. | ||
### 0.0.2 | ||
@@ -155,0 +177,0 @@ |
@@ -63,3 +63,3 @@ var assert = require("assert"); | ||
exports["exception"] = function() { | ||
var tinytim = require('../'); | ||
var tim = require('../').tim; | ||
assert.throws(function() { | ||
@@ -66,0 +66,0 @@ var result = tim("Hello {{config.foo.bar}}", {config: {moo: "blah"}}); |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
15412
12
262
207
2