angel_compiled_mustache

TravisPub

This is an Angel wrapper for the lightweight compiled_mustache render engine.

Installation

In pubspec.yaml:

  1. dependencies:
  2. angel_compiled_mustache: ^1.1.0

Usage

  1. configureServer(Angel app) async {
  2. // Run the plug-in
  3. await app.configure(compiled_mustache(new Directory('views')));
  4.  
  5. // Render `hello.mustache`
  6. await res.render('hello', {'name': 'world'});
  7. }

Options

  • fileExtension: The file extension to search for.Default is .mustache.
  • defaultLayout: The default layout file to use if none is specified during the render process.Default is main
  • layoutsPath: The path within the viewsDirectory to search for layouts in.Default is ./layouts
  • pagesPath: The path within the viewsDirectory to search for pages in.Default is ./pages
  • partialsPath: A path within the viewsDirectory to search for partials in.Default is ./partials.
  • fileSystem: The FileSystem to use to find the above paths.Default is const LocalFileSystem()