embla_templates 0.1.2 copy "embla_templates: ^0.1.2" to clipboard
embla_templates: ^0.1.2 copied to clipboard

outdatedDart 1 only

Templating platform for Embla

Templating for Embla #

Usage with Embla #

export 'package:embla/bootstrap.dart';
import 'package:embla/http.dart';

import 'package:embla_templates/embla_templates.dart';
import 'package:embla_templates/engines/html_view_engine.dart';

get embla => [
  new HttpBootstrapper(
    pipeline: pipe(
      (ViewComposer view) { // Will be responding to each request

        return view.render('index');
      }
    )
  ),
  new TemplatingBootstrapper(
    templatesDirectory: 'web',
    engines: [
      HtmlViewEngine
    ]
  )
];

Usage without Embla #

import 'dart:convert' show UTF8;

import 'package:embla_templates/embla_templates.dart';
import 'package:embla_templates/engines/html_view_engine.dart';

main() {
  final view = new ViewComposer.create(
    templatesDirectory: 'web',
    engines: [
      new HtmlViewEngine()
    ]
  );

  // Turn index.html into a Template -- a Future Shelf Response
  Template response = view.render('index');
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Templating platform for Embla

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

async, embla, mustache, path

More

Packages that depend on embla_templates