How to use the pug-load.file function in pug-load

To help you get started, we’ve selected a few pug-load examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flutter-view / flutter-view / src / watcher.ts View on Github external
function renderPugFileAsHtml(file: string) : string {
		const templateName = 'flutter'
		const parsed: Block = pugload.file(file, {
			lex: puglex,
			parse: pugparse,
			basedir: dir
		const linked: Block = puglinker(parsed)
		const codegenfn = pugcodegen(linked, {
			compileDebug: false,
			pretty: true,
			inlineRuntimeFunctions: false,
		const pugTemplate = pugwrap(codegenfn, templateName);
		return pugTemplate()


The Pug loader is responsible for loading the depenendencies of a given Pug file.

Latest version published 4 years ago

Package Health Score

80 / 100
Full package analysis