{"library":"pug-tail","title":"pug-tail","description":"A zero-runtime transpiler that expands custom component DSLs with slot syntax directly on the Pug AST. Version 0.1.0-alpha.6 targets Node >=18, ships TypeScript type definitions, and is in early alpha stage. Unlike runtime slot systems (e.g., Vue slots), pug-tail performs static expansion at build time, producing plain Pug output with no client-side overhead. It offers a Vue-like slot syntax (named, scoped, fallback) but compiles away entirely. The project has irregular release cadence and is not yet stable. Key differentiators: no runtime cost, AST-level transformation, and integration with existing Pug toolchains.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install pug-tail"],"cli":{"name":"pug-tail","version":null}},"imports":["import { extend } from 'pug-tail'","import { compile } from 'pug-tail'","const { extend } = require('pug-tail')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { extend } from 'pug-tail'\\nimport { lex, parse } from 'pug-lexer'\\nimport { parse as pugParse } from 'pug-parser'\\n\\n// Sample Pug template with custom component 'Button' and slot\\nconst source = `\\nButton\\n  slot(name='label')\\n    | Click me\\n`\\n\\nconst tokens = lex(source)\\nconst ast = pugParse(tokens)\\n\\n// Define component template for 'Button' (plain Pug AST)\\n// In real usage, you'd load from files. For demo, build minimal AST:\\nconst buttonTemplate = {\\n  type: 'Tag',\\n  name: 'button',\\n  attrs: { class: 'btn' },\\n  children: []\\n}\\n\\nconst extendedAst = extend(ast, {\\n  components: {\\n    Button: {\\n      template: buttonTemplate,\\n      slots: { label: true }\\n    }\\n  }\\n})\\n\\nconsole.log(JSON.stringify(extendedAst, null, 2))","lang":"typescript","description":"Expands a custom component with a slot in Pug AST, converting slot content into component children.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}