{"name":"pug-loader","version":"2.0.0","author":{"name":"Tobias Koppers @sokra"},"description":"Pug loader module for Webpack","dependencies":{"loader-utils":"~0.2.5","resolve":"^1.1.7"},"peerDependencies":{"pug":">=2.0.0-beta3 <3"},"devDependencies":{"mocha":"*","pug":"^2.0.0-beta4","should":"*"},"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/pug/pug-loader.git"},"license":"MIT","gitHead":"00a64c60e8eee7c522e197f2225b9dfc796be9c9","bugs":{"url":"https://github.com/pug/pug-loader/issues"},"homepage":"https://github.com/pug/pug-loader#readme","_id":"pug-loader@2.0.0","_shasum":"920342b84b3de1521799ae0c33913ac56e94ef02","_from":".","_npmVersion":"3.9.6","_nodeVersion":"6.2.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"920342b84b3de1521799ae0c33913ac56e94ef02","tarball":"http://registry-npm.ywwl.com/pug-loader/download/pug-loader-2.0.0.tgz","integrity":"sha512-wfwEUUneEF6LIXx9qEjSu5QDquP2cMEDhz4Kfxgudi8qHz1BBIfpyV22M/3a5oMqa8PAu/ACod2gJHlELS1l5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGTmB+HKEQHCNFHLaFIEONChX4NJyclOXKHuq6K1Q81AiBVlDV/b+UnmkWte/HS+6S7BnlBdIospFZ96utlxDpC7w=="}],"size":5156,"noattachment":false,"key":"/pug-loader/-/pug-loader-2.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/pug-loader-2.0.0.tgz_1469417964342_0.552729057148099"},"directories":{},"readme":"# pug-loader\n\nPug loader for webpack.\n\n## Usage\n\n``` javascript\nvar template = require(\"pug-loader!./file.pug\");\n// => returns file.pug content as template function\n\n// or, if you've bound .pug to pug-loader\nvar template = require(\"./file.pug\");\n\nvar locals = { /* ... */ };\n\nvar html = template(locals);\n// => the rendered HTML\n```\n\nFor more information on how to use webpack loaders, check the [official documentation][using-loaders].\n\nIn order to obtain the rendered HTML at compile time, combine this loader with [`apply-loader`](https://github.com/mogelbrod/apply-loader):\n\n```\nvar html = require(\"apply-loader!pug-loader!./file.pug\");\n// => the HTML is rendered at compile time\n```\n\n### Legacy `.jade` files\n\npug-loader fully supports `.jade` files. Just use pug-loader with `.jade` files as you would with a `.pug` file.\n\n### Includes\n\nIf you are using [includes], you must make sure that `.pug` (and if needed for legacy files, `.jade`) is bound to pug-loader. Check the webpack documentation on how to do that for [CLI][module-bind-cli] and for [configuration files][module-bind-config].\n\n### Options\n\nThe following [options] are available to be set for the loader. They are all mapped directly to Pug options, unless pointed out otherwise.\n\n- `doctype`\n  - Unlike Pug, it defaults to `\"html\"` if not set\n- `globals`\n- `self`\n- `plugins`\n  - Note that you cannot specify any Pug plugins implementing `read` or `resolve` hooks, as those are reserved for the loader\n- `pretty`\n- `filters`\n- `root`\n  - webpack uses its own file resolving mechanism, so while it is functionally equivalent to the Pug option with the same name, it is implemented differently\n\n### Embedded resources\n\nTry to use `require` for all your embedded resources, to process them with webpack.\n\n```pug\ndiv\n  img(src=require(\"./my/image.png\"))\n```\n\nRemember, you need to configure loaders for these file types too. You might be interested in the [file loader][file-loader].\n\n## License\n\n[MIT][mit]\n\n[file-loader]: https://github.com/webpack/file-loader\n[includes]: https://pugjs.org/language/includes.html\n[mit]: https://www.opensource.org/licenses/mit-license.php\n[module-bind-cli]: https://webpack.js.org/concepts/loaders/#via-cli\n[module-bind-config]: https://webpack.js.org/concepts/loaders/#configuration\n[options]: https://webpack.js.org/configuration/module/#useentry\n[using-loaders]: https://webpack.js.org/loaders\n","publish_time":1469417967595,"_cnpm_publish_time":1469417967595,"dist-tags":{"latest":"2.4.0"}}