UNPKG

svelte-preprocess

Version:

A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors

23 lines (22 loc) 909 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pug = void 0; const prepareContent_1 = require("../modules/prepareContent"); const markup_1 = require("../modules/markup"); const pug = (options) => ({ async markup({ content, filename }) { const { transformer } = await import('../transformers/pug.js'); content = (0, prepareContent_1.prepareContent)({ options: { ...options, stripIndent: true, }, content, }); return (0, markup_1.transformMarkup)({ content, filename }, transformer, options); }, }); exports.pug = pug; // both for backwards compat with old svelte-preprocess versions // (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise) exports.default = pug;