{"library":"pug-react-compiler","title":"pug-react-compiler","description":"A compiler that converts Pug (formerly Jade) templates into React components by parsing Pug AST into intermediate JavaScript, converting to SpiderMonkey AST via Esprima, and producing React-compatible render functions. Current stable version is 1.1.0, with low release cadence (last update 2015). Key differentiators: supports `require` hoisting for external components, handles conditionals and iteration, but lacks filters, mixins, and cases. Not intended for production use; includes a CLI tool and works with CommonJS bundlers.","language":"javascript","status":"deprecated","last_verified":"Fri May 01","install":{"commands":["npm install pug-react-compiler"],"cli":{"name":"pug-react","version":null}},"imports":["import { compileClient } from 'pug-react-compiler'","import { compile } from 'pug-react-compiler'","import pugReact from 'pug-react-compiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const React = require('react');\nconst { compile, compileClient } = require('pug-react-compiler');\n\n// Compile to a render function\nconst fn = compile('p Hello, world!');\nconst Component = React.createClass({ render: fn });\nconst markup = React.renderToStaticMarkup(React.createElement(Component));\nconsole.log(markup);\n\n// Compile to code string\nconst code = compileClient('div#root');\nconsole.log(code);","lang":"javascript","description":"Shows basic usage: compile Pug to a React component and to a code string.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}