An open API service indexing awesome lists of open source software.

https://github.com/localvoid/gulp-gorender

Gulp plugin for rendering files with Go `text.template` template engine
https://github.com/localvoid/gulp-gorender

Last synced: 9 months ago
JSON representation

Gulp plugin for rendering files with Go `text.template` template engine

Awesome Lists containing this project

README

          

# gulp-gorender

[Gulp](http://gulpjs.com) plugin for rendering files with
[Go](http://golang.org)
[text.Template](http://golang.org/pkg/text/template/) template engine.

## Install

```sh
$ npm install --save-dev gulp-gorender
```

You also need to have [gorender](http://github.com/localvoid/gorender)
installed.

## Usage

```js
var gulp = require('gulp');
var gorender = require('gulp-gorender');

gulp.task('default', function () {
return gulp.src('src/*.html', {html: true})
.pipe(gorender({data: 'data'}))
.pipe(gulp.dest('dist'));
});
```

## API

### gorender(options)

#### options

##### data

Type: `String`

The data directory.

Data files should be in JSON format.

##### include

Type: `String`

Include templates.

##### base

Type: `String`

Base template name.

##### html

Type: `Boolean`
Default: `false`

Use [html.Template](http://golang.org/pkg/text/template/) template
package.