platform/packages/mustache
2021-06-14 11:52:58 +08:00
..
example Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
lib Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
test Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
.gitignore Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
.travis.yml Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
analysis_options.yaml Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
CHANGELOG.md Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
LICENSE Updated license 2021-06-14 11:52:58 +08:00
mustache.iml Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
pubspec.yaml Updated dart requirements to 2.10 2021-02-14 13:22:25 +08:00
README.md Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -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: ^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.