compileFile method

Future<String> compileFile(
  1. File file, [
  2. Map<String, dynamic>? data,
  3. Map<String, dynamic>? options
])

Compiles and renders a Pug template file in one step. Automatically sets up Pug.js on first call.

Implementation

Future<String> compileFile(
  File file, [
  Map<String, dynamic>? data,
  Map<String, dynamic>? options,
]) async {
  await _ensureInitialized();
  return await Pug.compileFile(file, data, options);
}