{"name":"pug-loader","version":"2.1.0","author":{"name":"Tobias Koppers @sokra"},"description":"Pug loader module for Webpack","maintainers":[{"name":"timothygu","email":"timothygu99@gmail.com"}],"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/pugjs/pug-loader.git"},"license":"MIT","gitHead":"a26ff34a3b9468c1727543d941090a98f529c072","bugs":{"url":"https://github.com/pugjs/pug-loader/issues"},"homepage":"https://github.com/pugjs/pug-loader#readme","_id":"pug-loader@2.1.0","_shasum":"79c260ab9d4641d2908a9dcf7f939dfc423b19ea","_from":".","_npmVersion":"3.9.6","_nodeVersion":"6.2.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"79c260ab9d4641d2908a9dcf7f939dfc423b19ea","tarball":"http://registry-npm.ywwl.com/pug-loader/download/pug-loader-2.1.0.tgz","integrity":"sha512-1KkgfSIPVdLGy1YA4TOv+XSiZ7NzOP2kVPfh2QiKupHfqwJHw4DuylTO57Sp9aIEAH63rpE4YBOwa96TR1ZmMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnXTdRlB9iNuBQrhRgIRUlzLOWFfpOF6Cmlrv9hRB2rAIhAIYhHHaZ2wOaqpU3EWMHJdOoZaKW5QtDPlriluTvxdt9"}],"size":4988,"noattachment":false,"key":"/pug-loader/-/pug-loader-2.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-loader-2.1.0.tgz_1469420851507_0.5819283530581743"},"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":1469420851751,"_cnpm_publish_time":1469420851751,"dist-tags":{"latest":"2.4.0"}}