const pug = require('pug');
pug.filters.pug = require('pug-pug')();
Set filename for pug when render
pug.filters.pug = require('pug-pug')(function (options, args) {
options.filename = args.filename;
});
:pug
div Message for pug filter.
Output:
<script type="text/html"><div>Message for pug filter.</div></script>
Pretty render.
:pug(pretty=true)
div Message for pug filter.
Output:
<script type="text/html">
<div>Message for pug filter.</div>
</script>