Skip to content

localvoid/gorender_transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorender_transformer

pub transformer that renders templates with Go text.template template engine using JSON data file.

Prerequisites

This transformer depends on gorender CLI utility that renders templates.

Usage example

pubspec.yaml

name: gorender_example
dependencies:
  gorender_transformer: any
transformers:
- gorender_transformer

web/example.txt.tpl

Hello, {{ .user }}

web/example.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

About

Dart `pub` transformer for rendering go `text.template` templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages