platform/packages/mustache
2024-10-12 03:41:18 -07:00
..
example Refactor: changing namespace, imports, re-branding 2024-10-12 03:35:14 -07:00
lib Refactor: changing namespace, imports, re-branding 2024-10-12 03:35:14 -07:00
test Refactor: changing namespace, imports, re-branding 2024-10-12 03:35:14 -07:00
.gitignore Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43' 2020-02-15 18:29:03 -05:00
analysis_options.yaml Updated linter 2022-01-04 20:03:52 +08:00
AUTHORS.md Merged from sdk-2.12.x_nnbd 2021-06-20 20:37:20 +08:00
CHANGELOG.md Refactor: changing namespace, imports, re-branding 2024-10-12 03:39:20 -07:00
LICENSE Updated linter 2022-01-04 20:03:52 +08:00
pubspec.yaml Refactor: changing namespace, imports, re-branding 2024-10-12 03:41:18 -07:00
README.md Refactor: changing namespace, imports, re-branding 2024-10-12 03:41:18 -07:00

Mustache View Template for Protevus

Pub Version (including pre-releases) Null Safety Discord License

A service that renders Mustache template into HTML view for Protevus framework.

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

Installation

In pubspec.yaml:

dependencies:
    angel3_mustache: ^8.0.0

Usage

const FileSystem fs = const LocalFileSystem();

configureServer(Protevus 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.