The Protevus Platform: Unified Full-Stack Development https://protevus.com
Find a file
2017-11-18 13:39:10 -05:00
lib 1.1.0 2017-11-18 13:39:10 -05:00
test 1.1.0 2017-11-18 13:39:10 -05:00
.gitignore Done 2016-04-21 22:22:33 -04:00
.travis.yml Create .travis.yml 2017-04-05 18:41:09 -04:00
analysis_options.yaml 1.1.0 2017-11-18 13:39:10 -05:00
LICENSE Initial commit 2016-04-21 21:46:25 -04:00
pubspec.yaml 1.1.0 2017-11-18 13:39:10 -05:00
README.md 1.1.0 2017-11-18 13:39:10 -05:00

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: ^1.1.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.