From 44f519e9d1e0435dbd2b783013b36f5c71615e9c Mon Sep 17 00:00:00 2001 From: thomashii Date: Sat, 26 Jun 2021 18:24:52 +0800 Subject: [PATCH] Published mustache --- CHANGELOG.md | 2 +- packages/mustache/CHANGELOG.md | 10 +++++--- packages/mustache/README.md | 25 +++++++++++-------- packages/mustache/example/main.dart | 4 +-- ...gel_mustache.dart => angel3_mustache.dart} | 4 +-- packages/mustache/lib/src/cache.dart | 4 +-- packages/mustache/pubspec.yaml | 15 ++++------- packages/mustache/test/all_test.dart | 4 +-- 8 files changed, 36 insertions(+), 32 deletions(-) rename packages/mustache/lib/{angel_mustache.dart => angel3_mustache.dart} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc1b2fb8..a1840c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ * Migrated angel_orm_postgres to 3.0.0 (51/54 tests passed) * Create orm-sdk-2.12.x boilerplate (in progress) <= Milestone 2 * Migrated angel_auth_oauth2 to 4.0.0 (0/0 tests passed) -* Migrated angel_auth_cache to 4.0.0 (4/7 tests passed) +* Migrated angel_auth_cache to 4.0.0 (7/7 tests passed) * Migrated angel_auth_cors to 4.0.0 (10/15 tests passed) * Migrated angel_oauth2 to 4.0.0 (17/25 tests passed) * Migrated angel_proxy to 4.0.0 (5/7 tests passed) diff --git a/packages/mustache/CHANGELOG.md b/packages/mustache/CHANGELOG.md index aec563f5..8095fb0b 100644 --- a/packages/mustache/CHANGELOG.md +++ b/packages/mustache/CHANGELOG.md @@ -1,6 +1,10 @@ -# 3.0.0 +# Change Log + +## 3.0.0 + * Migrated to support Dart SDK 2.12.x NNBD * Replaced `mustache4dart` with `mustache_template` -# 2.0.0 -* Angel 2 and Dart 2 support. \ No newline at end of file +## 2.0.0 + +* Angel 2 and Dart 2 support. diff --git a/packages/mustache/README.md b/packages/mustache/README.md index 8cb38563..6e5e106e 100644 --- a/packages/mustache/README.md +++ b/packages/mustache/README.md @@ -1,22 +1,26 @@ -# mustache -[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion) -[![version](https://img.shields.io/pub/v/angel_mustache.svg)](https://pub.dartlang.org/packages/angel_mustache) -[![build status](https://travis-ci.org/angel-dart/mustache.svg?branch=master)](https://travis-ci.org/angel-dart/mustache) +# Mustache Template Renderer for Angel3 -Mustache (Handlebars) view generator for the [Angel](https://github.com/angel-dart/angel) -web server framework. +[![version](https://img.shields.io/badge/pub-v3.0.0-brightgreen)](https://pub.dartlang.org/packages/angel3_mustache) +[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety) +[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion) + +[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mustache/LICENSE) + +A service that renders Mustache template into HTML view for [Angel3](https://github.com/dukefirehawk/angel) framework. Thanks so much @c4wrd for his help with bringing this project to life! -# Installation +## Installation + In `pubspec.yaml`: ```yaml dependencies: - angel_mustache: ^2.0.0 + angel3_mustache: ^3.0.0 ``` -# Usage +## Usage + ```dart const FileSystem fs = const LocalFileSystem(); @@ -29,7 +33,8 @@ configureServer(Angel app) async { } ``` -# Options +@# 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`. diff --git a/packages/mustache/example/main.dart b/packages/mustache/example/main.dart index d94023b5..1da65588 100644 --- a/packages/mustache/example/main.dart +++ b/packages/mustache/example/main.dart @@ -1,5 +1,5 @@ -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_mustache/angel_mustache.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_mustache/angel3_mustache.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; diff --git a/packages/mustache/lib/angel_mustache.dart b/packages/mustache/lib/angel3_mustache.dart similarity index 93% rename from packages/mustache/lib/angel_mustache.dart rename to packages/mustache/lib/angel3_mustache.dart index b231ef92..3e7c2ca3 100644 --- a/packages/mustache/lib/angel_mustache.dart +++ b/packages/mustache/lib/angel3_mustache.dart @@ -1,8 +1,8 @@ -library angel_mustache; +library angel3_mustache; import 'dart:async'; -import 'package:angel_framework/angel_framework.dart'; +import 'package:angel3_framework/angel3_framework.dart'; import 'package:file/file.dart'; import 'package:mustache_template/mustache_template.dart' as viewer; import 'package:path/path.dart' as p; diff --git a/packages/mustache/lib/src/cache.dart b/packages/mustache/lib/src/cache.dart index 912306ef..f3c3887c 100644 --- a/packages/mustache/lib/src/cache.dart +++ b/packages/mustache/lib/src/cache.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:collection'; import 'package:file/file.dart'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_mustache/src/mustache_context.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_mustache/src/mustache_context.dart'; class MustacheViewCache { /// The context for which views and partials are diff --git a/packages/mustache/pubspec.yaml b/packages/mustache/pubspec.yaml index 02879566..c0f14992 100644 --- a/packages/mustache/pubspec.yaml +++ b/packages/mustache/pubspec.yaml @@ -1,16 +1,11 @@ -name: angel_mustache -version: 2.0.0 -description: Mustache view generator for Angel. -homepage: https://github.com/angel-dart/angel_mustache -publish_to: none +name: angel3_mustache +version: 3.0.0 +description: A service that renders Mustache template into HTML view for Angel3 +homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/mustache environment: sdk: '>=2.12.0 <3.0.0' dependencies: - angel_framework: #^2.0.0-alpha - git: - url: https://github.com/dukefirehawk/angel.git - ref: sdk-2.12.x_nnbd - path: packages/framework + angel3_framework: ^4.0.0 file: ^6.1.2 mustache_template: ^2.0.0 path: ^1.8.0 diff --git a/packages/mustache/test/all_test.dart b/packages/mustache/test/all_test.dart index 91e6a2a2..5d20d1c1 100644 --- a/packages/mustache/test/all_test.dart +++ b/packages/mustache/test/all_test.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_mustache/angel_mustache.dart'; +import 'package:angel3_framework/angel3_framework.dart'; +import 'package:angel3_mustache/angel3_mustache.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; import 'package:test/test.dart';