forked from firka/flutter
switch to package:mustache (#6273)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user