This commit is contained in:
Tobe O 2018-11-08 10:56:00 -05:00
parent 4bc0e7c9cd
commit b5d83e0a21
5 changed files with 28 additions and 9 deletions

3
.gitignore vendored
View file

@ -26,4 +26,5 @@ doc/api/
# (Library packages only! Remove pattern if developing an application package)
pubspec.lock
.idea
.idea
.dart_tool

2
CHANGELOG.md Normal file
View file

@ -0,0 +1,2 @@
# 2.0.0
* Angel 2 and Dart 2 support.

View file

@ -13,7 +13,7 @@ In `pubspec.yaml`:
```yaml
dependencies:
angel_mustache: ^1.1.0
angel_mustache: ^2.0.0
```
# Usage

16
example/main.dart Normal file
View file

@ -0,0 +1,16 @@
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_mustache/angel_mustache.dart';
import 'package:file/file.dart';
import 'package:file/local.dart';
const FileSystem fs = const LocalFileSystem();
configureServer(Angel app) async {
// Run the plug-in
await app.configure(mustache(fs.directory('views')));
// Render `hello.mustache`
app.get('/', (req, res) async {
await res.render('hello', {'name': 'world'});
});
}

View file

@ -2,13 +2,13 @@ name: angel_mustache
description: Mustache view generator for Angel.
author: thosakwe <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_mustache
version: 1.1.0
version: 2.0.0
environment:
sdk: ">=1.19.0"
sdk: ">=2.0.0-dev <3.0.0"
dependencies:
angel_framework: "^1.1.0-alpha"
file: ^2.0.0
mustache4dart: ">= 1.0.0 < 2.0.0"
angel_framework: ^2.0.0-alpha
file: ^5.0.0
mustache4dart: ^3.0.0-dev
dev_dependencies:
http: ">= 0.11.3 < 0.12.0"
test: ">= 0.12.13 < 0.13.0"
http:
test: