PugServer class

Server-side Pug wrapper that communicates with a persistent Node.js server.

Constructors

PugServer()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

compile(String template, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Compiles and renders a Pug template string in one step.
compileFile(File file, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Compiles and renders a Pug template file in one step.
isAvailable() Future<bool>
Checks if Pug.js is available for use.
render(String template, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Renders a Pug template string with optional data and options.
renderFile(File file, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Renders a Pug template file with optional data and options.
setup({bool verbose = false}) Future<bool>
Sets up Pug.js by running npm install.
shutdown() Future<void>
Stops the persistent Node.js server.