angel_mustache 1.1.0

  • README.md
  • Installing
  • Versions
  • 9

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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  angel_mustache: ^1.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:angel_mustache/angel_mustache.dart';
  
Version Uploaded Documentation Archive
1.1.0 Nov 18, 2017 Go to the documentation of angel_mustache 1.1.0 Download angel_mustache 1.1.0 archive
1.0.3 Apr 5, 2017 Go to the documentation of angel_mustache 1.0.3 Download angel_mustache 1.0.3 archive
1.0.2 Jun 21, 2016 Go to the documentation of angel_mustache 1.0.2 Download angel_mustache 1.0.2 archive
1.0.1 May 2, 2016 Go to the documentation of angel_mustache 1.0.1 Download angel_mustache 1.0.1 archive
1.0.0 May 2, 2016 Go to the documentation of angel_mustache 1.0.0 Download angel_mustache 1.0.0 archive
1.0.0-dev Apr 22, 2016 Go to the documentation of angel_mustache 1.0.0-dev Download angel_mustache 1.0.0-dev archive
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
9
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.0.0.
 
 Because angel_mustache depends on file >=0.1.0 <5.0.2 which requires SDK version <2.0.0-∞, version solving failed.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use angel_mustache.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0