5.12.2 • Published 8 years ago

static-engine-render v5.12.2

Weekly downloads
43
License
MIT
Repository
github
Last release
8 years ago

static-engine-render

Dependency Status devDependency Status js-standard-style

This is a plugin for static-engine. It renders and saves a file using a provided render function for each object in the collection. Pass it first a route, the file to save. It will interpolate properties from each object into the string provided. Second pass it a function to use for rendering. For each object in the collection it is passed first the object and then a callback function. The renderer may use the callback or optionally return a promise.

var engine = require('static-engine')
var render = require('static-engine-render')
var pluginA = require('plugin-a')
var renderer = function (page, done) {
  // some templating
  done(err, result)
}

engine([
  pluginA,
  render('./your-route/:var/index.html', renderer)
])
5.12.2

8 years ago

5.12.1

9 years ago

5.12.0

9 years ago

5.11.5

9 years ago

5.11.4

9 years ago

5.11.3

9 years ago

5.11.2

9 years ago

5.11.1

9 years ago

5.11.0

10 years ago

5.10.0

10 years ago

5.9.0

10 years ago

5.8.0

10 years ago

5.7.0

10 years ago

5.6.1

10 years ago

5.6.0

10 years ago

5.5.0

10 years ago

5.4.1

10 years ago

5.4.0

10 years ago

5.3.0

10 years ago

5.2.2

10 years ago

5.2.1

10 years ago

5.2.0

10 years ago

5.1.0

10 years ago

5.0.1

10 years ago

5.0.0

10 years ago

4.3.0

10 years ago

4.2.1

10 years ago

4.2.0

10 years ago

4.1.0

10 years ago

4.0.0

10 years ago

3.1.0

10 years ago

3.0.0

10 years ago

2.2.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.2.0

10 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago