{"name":"pug-code-gen","version":"3.0.2-canary-5","description":"Default code-generator for pug.  It generates HTML via a JavaScript template function.","keywords":["pug"],"dependencies":{"constantinople":"^4.0.1","doctypes":"^1.1.0","js-stringify":"^1.0.2","pug-attrs":"3.0.0","pug-error":"2.0.0","pug-runtime":"3.0.0","void-elements":"^3.1.0","with":"^7.0.0"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-code-gen"},"author":{"name":"Forbes Lindesay"},"license":"MIT","readme":"# pug-code-gen\n\nDefault code-generator for pug.  It generates HTML via a JavaScript template function.\n\n<!-- [![Build Status](https://img.shields.io/travis/pugjs/pug-code-gen/master.svg)](https://travis-ci.org/pugjs/pug-code-gen) -->\n[![Dependencies Status](https://david-dm.org/pugjs/pug/status.svg?path=packages/pug-code-gen)](https://david-dm.org/pugjs/pug?path=packages/pug-code-gen)\n[![npm version](https://img.shields.io/npm/v/pug-code-gen.svg)](https://www.npmjs.org/package/pug-code-gen)\n\n## Installation\n\n    npm install pug-code-gen\n\n## Usage\n\n```js\nvar generateCode = require('pug-code-gen');\n```\n\n### `generateCode(ast, options)`\n\nGenerate a JavaScript function string for the given AST.\n\n`ast` is a fully expanded AST for Pug, with all inclusion, extends, and filters resolved.\n\n`options` may contain the following properties that have the same meaning as the options with the same names in `pug`:\n\n - pretty (boolean): default is `false`\n - compileDebug (boolean): default is `true`\n - doctype (string): default is `undefined`\n - inlineRuntimeFunctions (boolean): default is `false`\n - globals (array of strings): default is `[]`\n - self (boolean): default is `false`\n\nIn addition to above, `pug-code-gen` has the following unique options:\n\n - includeSources (object): map of filename to source string; used if `compileDebug` is `true`; default is `undefined`\n - templateName (string): the name of the generated function; default is `'template'`\n\n```js\nvar lex = require('pug-lexer');\nvar parse = require('pug-parser');\nvar wrap = require('pug-runtime/wrap');\nvar generateCode = require('pug-code-gen');\n\nvar funcStr = generateCode(parse(lex('p Hello world!')), {\n  compileDebug: false,\n  pretty: true,\n  inlineRuntimeFunctions: false,\n  templateName: 'helloWorld'\n});\n//=> 'function helloWorld(locals) { ... }'\n\nvar func = wrap(funcStr, 'helloWorld');\nfunc();\n//=> '\\n<p>Hello world!</p>'\n```\n\n### `new generateCode.CodeGenerator(ast, options)`\n\nThe constructor for the internal class of the code generator. You shouldn't need to use this for most purposes.\n\n## License\n\n  MIT\n","readmeFilename":"README.md","_id":"pug-code-gen@3.0.2-canary-5","_nodeVersion":"12.20.2","_npmVersion":"6.14.11","dist":{"integrity":"sha512-u5Y7sitcaKK23SO/lugzuRIPYqYl+ZWICpWNQUVuIgyEgcmdRJ/cBAwm1CXa5Az9z02IT1saZznb8m/sobT+lA==","shasum":"22b63d9cf6f625e7f0674d1565db579aea95b6b5","tarball":"http://registry-npm.ywwl.com/pug-code-gen/download/pug-code-gen-3.0.2-canary-5.tgz","fileCount":5,"unpackedSize":28511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO998CRA9TVsSAnZWagAAUFQP/A+2b5CsD6pQghwT3xW0\nOoRVNYU0U3LZ9OplCiMCanm8i1J2SFtjiveutScohlP12Bl2N6Ozo4tFL6+O\nzN04cPhLoGxaxYDOJiL6Rmnkto/ECwg2RoX4OQaNZiMwE8ciuYjWVQXC2mNa\nhNmcDPh55+Lb47l3SPWkjedfEaIx3WlLTfTtvqRGhvtRCCp1S2OKlFjEaqSZ\nLCp9tz+QFvgo/KkF7XX2iDvVg5ijEFbJ+oSOpFpntJ3fa6MRC3J6QaoNwThb\ne4qTw64W6jyDAy44NkaGJM0XmasfUYh8zFKlal61ao8r999PeaW4TNpWvuhn\n7a1C66Ou+1qoKIABl/QIcPI9VIrI4TIBjXlbDig8gbpEjrmOmRvpcOGPruLX\nL36OUnpCHs3m2lp/5B7zH4+t1THSmaUo5s+lZ+nEc0l/u/e/FXV0x3dAPAgW\n95Ot24VVIiRUfdkDg22Moi2pDMFVSp8uU3jXXDTSRJmEDy6yue8gqfyw30NP\n2d63+K7F9HGmTmuqtA+54kGgEvnEZuq+xYIYpymH5P+fPljq+9a6bQrzHm2g\nVayzqcKveUyGTDgidesyRVqOIQoVa28VC0cLWV/X1UMVzA5iJu05k8P9sV6X\nmcl2iDRWsfjKVI1+hsozVraK1ZZv6/NCEootG3MZkVOIEje4biIOZESj+pTV\nvnFj\r\n=Tdz+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFDkhCwWPDcg0CwrXyjLNfgV8hbD4mCkEXDsMw5VgDfAiEArGdZMYxyGddULEjJvh1lNs5JxquRRQCoc382q4CYhjs="}],"size":8099,"noattachment":false,"key":"/pug-code-gen/-/pug-code-gen-3.0.2-canary-5.tgz"},"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":"pug-bot@rollingversions.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-code-gen_3.0.2-canary-5_1614536571822_0.8904204554658166"},"_hasShrinkwrap":false,"publish_time":1614536571959,"_cnpm_publish_time":1614536571959,"dist-tags":{"canary":"3.0.4-canary-8","latest":"3.0.4"}}