platform/packages/mustache
Patrick Stewart e4775d1ea9
Some checks are pending
Angel3 CI / Validate framework package (push) Waiting to run
Angel3 CI / Validate ORM packages (push) Waiting to run
Remove: deleting melos jetbrains artifacts
2024-10-01 20:11:25 -07:00
..
example Published mustache 2021-06-26 18:24:52 +08:00
lib Published 8.0.0 2023-06-10 12:10:21 +08:00
test Published mustache 2021-06-26 18:24:52 +08: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 Updated to support SDK 3.3.0 2024-06-23 12:09:26 +08:00
LICENSE Updated linter 2022-01-04 20:03:52 +08:00
pubspec.yaml Updated to support SDK 3.3.0 2024-06-23 12:09:26 +08:00
README.md Replaced Gitter with Discord chat 2024-07-07 23:02:49 +08:00

Mustache View Template for Angel3

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

A service that renders Mustache template into HTML view for Angel3 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(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.