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
- Host: GitHub
- URL: https://github.com/localvoid/gulp-gorender
- Owner: localvoid
- License: mit
- Created: 2014-08-10T02:10:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-24T04:54:34.000Z (over 10 years ago)
- Last Synced: 2025-01-25T06:25:24.017Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 160 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.