{"library":"pug-to-svelte","title":"pug-to-svelte","description":"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.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install pug-to-svelte"],"cli":null},"imports":["import pugToSvelte from 'pug-to-svelte'","const pugToSvelte = require('pug-to-svelte')","import pugToSvelte from 'pug-to-svelte'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pugToSvelte from 'pug-to-svelte';\n\nconst pugCode = `\nscript.\n  let count = 0\n\nbutton(on:click={() => count++}) Clicked {count} times\n`;\n\ntry {\n  const htmlResult = pugToSvelte(pugCode);\n  console.log(htmlResult); // Output: Svelte component with HTML\n} catch (error) {\n  console.error('Transpilation failed:', error);\n}\n\n// Use with Svelte preprocessor:\nimport { preprocess } from 'svelte/compiler';\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\n\nconst preprocessed = await preprocess(\n  pugCode,\n  vitePreprocess(),\n  { filename: 'Component.svelte' }\n);\nconsole.log(preprocessed.code);","lang":"typescript","description":"Transpile a simple Pug template to Svelte HTML, including error handling and integration with Svelte preprocessors.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}