Pug-to-Svelte transpiler (v1.1.0, stable, complete). Converts Pug templates to HTML while preserving Svelte logic, expressions, and control structures. Designed as a Svelte preprocessor. Key limitations: tabs-only indentation, no tag splitting across lines, no prop shorthands, no spread props, no style props. Production-ready and actively maintained but feature-complete. Faster and lighter than generic template transpilers, with zero artificial syntax.
npm install pug-to-svelteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a simple Pug template to Svelte HTML, including error handling and integration with Svelte preprocessors.
Convert indentation to tabs. Most editors have a 'Convert Indentation to Tabs' option.
Ensure each tag (including attributes) is on one line.
Always explicitly write both prop name and value: `value={value}`.Expand props manually or use a wrapper component.
Use inline styles via the `style` attribute as an object string.
No action needed, but evaluate if other transpilers (like svelte-preprocess with pug) suit your needs.
Replace spaces with tabs for indentation in your .svelte files using Pug syntax.
Put the entire tag (including attributes) on a single line.
Use `import pugToSvelte from 'pug-to-svelte'` or `const pugToSvelte = require('pug-to-svelte')`.