angel-dart-archive / mustache

moved to angel-dart/angel/packages/mustache

Home Page:https://github.com/angel-dart/angel/tree/master/packages/mustache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mustache

Gitter version build status

Mustache (Handlebars) view generator for the Angel web server framework.

Thanks so much @c4wrd for his help with bringing this project to life!

Installation

In pubspec.yaml:

dependencies:
    angel_mustache: ^2.0.0

Usage

const FileSystem fs = const LocalFileSystem();

configureServer(Angel app) async {
  // Run the plug-in
  await app.configure(mustache(fs.directory('views')));
  
  // Render `hello.mustache`
  await res.render('hello', {'name': 'world'});
}

Options

  • partialsPath: A path within the viewsDirectory to search for partials in. Default is ./partials.
  • fileExtension: The file extension to search for. Default is .mustache.

About

moved to angel-dart/angel/packages/mustache

https://github.com/angel-dart/angel/tree/master/packages/mustache

License:MIT License


Languages

Language:Dart 98.7%Language:HTML 1.3%