switch to package:mustache (#6273)

This commit is contained in:
Dan Rubel
2016-10-11 17:44:12 -04:00
committed by GitHub
parent 6ec68c4734
commit cd65b7902c
5 changed files with 10 additions and 11 deletions

View File

@@ -162,8 +162,7 @@ All done! In order to run your application, type:
int fileCount = 0;
if (renderDriverTest)
templateContext['withDriverTest?'] = <String, dynamic>{};
templateContext['withDriverTest'] = renderDriverTest;
Template createTemplate = new Template.fromName('create');
fileCount += createTemplate.render(new Directory(dirPath), templateContext,

View File

@@ -4,7 +4,7 @@
import 'dart:io';
import 'package:mustache4dart/mustache4dart.dart' as mustache;
import 'package:mustache/mustache.dart' as mustache;
import 'package:path/path.dart' as path;
import 'cache.dart';
@@ -109,7 +109,7 @@ class Template {
if (sourceFile.path.endsWith(_kTemplateExtension)) {
String templateContents = sourceFile.readAsStringSync();
String renderedContents = mustache.render(templateContents, context);
String renderedContents = new mustache.Template(templateContents).renderString(context);
finalDestinationFile.writeAsStringSync(renderedContents);