.. | ||
example | ||
lib | ||
test | ||
.gitignore | ||
analysis_options.yaml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
LICENSE | ||
pubspec.yaml | ||
README.md |
Mustache View Template for Protevus
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:
protevus_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
.