{"name":"pug-code-gen","version":"3.0.0-canary-1","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-canary-1","pug-error":"2.0.0-canary-1","pug-runtime":"3.0.0-canary-1","void-elements":"^3.1.0","with":"^6.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.0-canary-1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-usMMm7fqw5wvuLPRz9ETMdxUErTq/wCZemEgGwS+/atl+DEayfLPZkWQGXszRB+e6401LnvEDtXUEd53a/1wGw==","shasum":"e2e439b5ed01ea02f0412b9eaebca5baeb0121a6","tarball":"http://registry-npm.ywwl.com/pug-code-gen/download/pug-code-gen-3.0.0-canary-1.tgz","fileCount":5,"unpackedSize":28319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyv5KCRA9TVsSAnZWagAAbDUP/2CTPoTZ+qGNq8cHFxam\naMtPodtwlVfvcaTP2vmR2ggQpS+nLiZc6c4QfNH7oJklPkwsdL7Pk8hB9Hg/\ngBT6NbmGMKLSE2BPtuG4DzRrfd0kRuYOcO7ISNH/wkUC2pdTGc6GMeAxInGm\ndWk7XfEcezFh2ekB1hc4e2L67aZmi+5nUwll4KNQt1d0sikwI17UAmAutFvW\nN2fHx+YcCkN4zGkC+9F2Vxz2qhFJ7fdWd6tycvUyJ7ula6aERJoq0ul6bx2L\nl4M06KzDv72/AlAO4h7YvXCfxkBZ+kooerIYuNLb/uFKtqkAx+K/U30Ki6hT\n91M2FIGrTHRoTkyE2TBKrUw9cwh3E6OKHNRzhdQH2iC058eUrdljJRZHSACm\n9BYTyd2idz6JgFOaX77Z2qT+W61ih5FArSYNPWZksb8g45MWoS0sZuNoM7D7\nlfAL0dKWlp4kGan7j9TfBIl7wh+V8Q+6cq9jeSWgacAEiyCHfOEgFZdpL7/J\nU2HQHtCuNcY34QFrpb96hx5XKtSqEYxQJ6Xe/6GbHmwPzaGMH8KJ+lKZSnfq\nEqzX61nUA1rUM3R0mGiNsOB6rjkJ5sX3JcW/2qP1UzKOmtgTSRWitnW19Qzn\nm1KTbTJj2fmySPfM4tJF3PahvQW6hAR0U6y+G3zAjl+VopFxwn2A3sU12RIh\naHQM\r\n=cUly\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEk2tsga+khkmqbVhYfL0ZuIVdFeuaQIkpV9ROlligqAiEA64zsiiMId5BHrE1mC0XDI6EQBqJKjYjWVrCksrrKqtQ="}],"size":8038,"noattachment":false,"key":"/pug-code-gen/-/pug-code-gen-3.0.0-canary-1.tgz"},"maintainers":[{"email":"forbes@lindesay.co.uk","name":"forbeslindesay"},{"email":"pug-bot@rollingversions.com","name":"pug-bot"},{"email":"timothygu99@gmail.com","name":"timothygu"}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-code-gen_3.0.0-canary-1_1590361673943_0.07560830249525807"},"_hasShrinkwrap":false,"publish_time":1590361674063,"_cnpm_publish_time":1590361674063,"dist-tags":{"canary":"3.0.4-canary-8","latest":"3.0.4"}}