platform/packages/mustache/lib/src/mustache_context.dart

21 lines
485 B
Dart
Raw Normal View History

2017-11-18 18:39:10 +00:00
import 'package:file/file.dart';
import 'package:path/path.dart' as path;
class MustacheContext {
Directory viewDirectory;
Directory partialDirectory;
String extension;
MustacheContext([this.viewDirectory, this.partialDirectory, this.extension]);
File resolveView(String viewName) {
2017-11-18 18:39:10 +00:00
return viewDirectory.childFile('${viewName}${extension}');
}
File resolvePartial(String partialName) {
2017-11-18 18:39:10 +00:00
return partialDirectory.childFile('${partialName}${extension}');
}
}