https://github.com/localvoid/gorender_transformer
Dart `pub` transformer for rendering go `text.template` templates
https://github.com/localvoid/gorender_transformer
Last synced: about 1 year ago
JSON representation
Dart `pub` transformer for rendering go `text.template` templates
- Host: GitHub
- URL: https://github.com/localvoid/gorender_transformer
- Owner: localvoid
- License: bsd-2-clause
- Created: 2014-08-20T05:32:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-21T16:36:49.000Z (over 11 years ago)
- Last Synced: 2025-01-25T06:25:23.555Z (about 1 year ago)
- Language: Dart
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [gorender](https://github.com/localvoid/gorender)_transformer
> [pub](https://pub.dartlang.org/) transformer that renders templates
> with [Go](http://golang.org)
> [text.template](http://golang.org/pkg/text/template/) template
> engine using JSON data file.
## Prerequisites
This transformer depends on
[gorender](https://github.com/localvoid/gorender) CLI utility that
renders templates.
## Usage example
### `pubspec.yaml`
```yaml
name: gorender_example
dependencies:
gorender_transformer: any
transformers:
- gorender_transformer
```
### `web/example.txt.tpl`
```
Hello, {{ .user }}
```
### `web/example.json`
```json
{"user": "Guest"}
```
## Options
### `template-extension`
Template extensions
TYPE: `String`
DEFAULT: `.gtpl`
### `data-extension`
Data extensions
TYPE: `String`
DEFAULT: `.json`
### `html-extension`
Templates that will be rendered with `html.template` package. The full
extension of the template should consist of `html-extension` and
`template-extension`, for example: `.html.gtpl`.
TYPE: `String`
DEFAULT: `.html`