isAvailable static method

Future<bool> isAvailable()

Checks if Pug.js is available for use.

Returns true if Pug can be used, false otherwise.

Example:

if (await PugServer.isAvailable()) {
  final html = await PugServer.render('p Hello World');
} else {
  await PugServer.setup();
}

Implementation

static Future<bool> isAvailable() async {
  return await _isPugAvailable();
}