A mustache view generator for Angel, using compiled_mustache
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
lib
scripts
test
tool
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
pubspec.yaml

README.md

angel_compiled_mustache

Travis Pub

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

Installation

In pubspec.yaml:

dependencies:
    angel_compiled_mustache: ^1.1.0

Usage

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

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()