{"_id":"@dsktschy/laravel-mix-pug","_rev":"1-f072fca7cd2f28f58ab600947b49f666","name":"@dsktschy/laravel-mix-pug","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dsktschy/laravel-mix-pug","version":"1.0.0","description":"Laravel Mix Plugin for compiling Pug/Jade templates.","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/dsktschy/laravel-mix-pug.git"},"keywords":["laravel","mix","pug"],"author":{"name":"Matej Svajger","email":"hello@matejsvajger.com"},"license":"MIT","bugs":{"url":"https://github.com/dsktschy/laravel-mix-pug/issues"},"homepage":"https://github.com/dsktschy/laravel-mix-pug#readme","dependencies":{"foldero":"^0.1.1","glob":"^7.1.2","js-yaml":"^3.9.1"},"peerDependencies":{"laravel-mix":"^1.4.2 || 2.x || 3.x || 4.x"},"gitHead":"866b1231324f223909b86f2bb45658f1ebc3f053","_id":"@dsktschy/laravel-mix-pug@1.0.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jdE9lnyUKLieg0XAnbouLIVbRsEE1BzTEgcsg7tmzTzADh/ABcC2G3+fOxem8aW7F5LXvqeonLyJ7PnIJzD/vw==","shasum":"ca43883d31a15f260a1b517dafd2f74f93e59084","tarball":"https://registry.npmjs.org/@dsktschy/laravel-mix-pug/-/laravel-mix-pug-1.0.0.tgz","fileCount":7,"unpackedSize":27939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9BJCCRA9TVsSAnZWagAAf64P/jz016wOpwAr+M7YSTlv\nDWB8NtBIwTHI/HRvuYtR1sSmnaGNhht+cqFeLUJJBZKmy6g+x9IHYqLwxan1\n84YPMa+dLsU4/rF4WOOkrlXBBDtSdAayshq7f10H9IpOh77jyan/BduVrRDi\n5t5jAYyFP9NfHdTn6YpxxVG04oQF0oerzZYqIR8fIFqSO2DZlg0OMDZTmabV\nDUqWDUWSFHkv7bN7bmeleaq6JUGcPDqxZsp5Q4300rwQqY1WBngpf05p1d4A\nxxez1DDXDdINVpqCTsUb4Yi4LuLSPXgLewZNt7E0a9m/7jVHh0c3o+cmcWah\nt+Pu5g4E3ujDaYSw6eQzV3jH0QPt1aNn9fKuPkKgtkw2gvNz2qB+eK1Hfs1p\n2poPEUWcWGI5Nqjpu6DDkNgXNSd+Z9hnNfuTuZ8T3QJKoQlhrKKuG+qlE7QN\ncu8KkIEHG81eICmGcuPxX2TAM8rHrTlBE4O19D1UKoAmH5SanONlqu1HswLT\nBbXi/fxVpU/tfNYlAuwOcaeIcD/YTVPFMWb7HcK2Ur/o2LFCJij13JFnVgJO\niwBzuclj/b+5P9Bq1ykR/5eaTjLBERA8xIXyPvJmZfSM7LymtY8bGmH5/+m9\nRXBWS4DEjYTk7h2oe1oaz4rEeKvIVZr4jtx8cowAqWuyqdTPlhRPpQeBv2C2\nsN1e\r\n=1P0K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHIdRDFM3GYK7Ea8Wa3Zjf7rm8DA+IeTe9wiGVPzobvAiEAm3+zpHclrmw/Wh55wofJfD/h0tONK3WHgYWLn3APwP4="}]},"maintainers":[{"name":"dsktschy","email":"npm.dsktschy@gmail.com"}],"_npmUser":{"name":"dsktschy","email":"npm.dsktschy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/laravel-mix-pug_1.0.0_1559499330206_0.680521828264107"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-02T18:15:30.162Z","1.0.0":"2019-06-02T18:15:30.327Z","modified":"2022-04-05T05:44:59.865Z"},"maintainers":[{"name":"dsktschy","email":"npm.dsktschy@gmail.com"}],"description":"Laravel Mix Plugin for compiling Pug/Jade templates.","homepage":"https://github.com/dsktschy/laravel-mix-pug#readme","keywords":["laravel","mix","pug"],"repository":{"type":"git","url":"git+https://github.com/dsktschy/laravel-mix-pug.git"},"author":{"name":"Matej Svajger","email":"hello@matejsvajger.com"},"bugs":{"url":"https://github.com/dsktschy/laravel-mix-pug/issues"},"license":"MIT","readme":"# laravel-mix-pug\nLaravel Mix Plugin for compiling Pug/Jade templates.\n\n<p align=\"center\">\n<a href=\"https://www.npmjs.com/package/@dsktschy/laravel-mix-pug\"><img src=\"https://img.shields.io/npm/v/@dsktschy/laravel-mix-pug.svg\" alt=\"NPM\"></a>\n<a href=\"https://www.npmjs.com/package/@dsktschy/laravel-mix-pug\"><img src=\"https://img.shields.io/npm/dt/@dsktschy/laravel-mix-pug.svg\" alt=\"NPM\"></a>\n<a href=\"https://www.npmjs.com/package/@dsktschy/laravel-mix-pug\"><img src=\"https://img.shields.io/npm/l/@dsktschy/laravel-mix-pug.svg\" alt=\"NPM\"></a>\n</p>\n\n## Introduction\n\nThis package provides a plugin for Laravel Mix to compile pug templates. `@dsktschy/laravel-mix-pug` requires Laravel Mix to work. Please follow the instructions on how to use it on the package [repository](https://github.com/JeffreyWay/laravel-mix).\n\n## Usage\n\nInstall this package into your project:\n\n```\nnpm install @dsktschy/laravel-mix-pug --save-dev\n```\nHead over to your `webpack.mix.js` and register it on the Laravel Mix API:\n\n```js\nlet mix = require('laravel-mix');\nmix.pug = require('@dsktschy/laravel-mix-pug');\n\nmix.js('src/app.js', 'dist')\n   .sass('src/app.scss', 'dist')\n   .pug('src/*.pug', 'dist')\n   .setPublicPath('dist');\n```\n\n## Options\nYou can also pass in a third optional parameter: *options* object. It accepts two options:\n\n### seeds\nThis is a path to a folder with seed files. Files can be of type `json` or `yaml`. They will be parsed and provided in your pug template locals under the seed file name and then contents.\n\n```js\nmix.pug('src/*.pug', 'dist', {seeds:'src/seeds'});\n```\n\nAnd if you have a file `demo.yml` in there all the content will be available in your template under\n\n```pug\na(href=seed.demo.anchor.link) seed.demo.anchor.name\n```\n\n### locals\nIt's possible to pass in an object which will be added to locals in your pug templates:\n\n```js\nmix.pug('src/*.pug', 'dist', {\n    locals: {\n        config: { baseUrl: 'http://my-template.dev/' }\n    }\n});\n```\n\nand in your pug file:\n\n```pug\nlink(rel=\"stylesheet\" media=\"screen\" href=`{config.baseUrl}css/app.css`)\nscript(src=`{config.baseUrl}js/main.js`)\n```\n\n### pug\nYou can pass in [pug config options](https://pugjs.org/api/reference.html#options) under `pug` key:\n\n```js\nmix.pug('src/*.pug', 'dist', {\n    pug: {\n        pretty: true,\n        debug: true\n    }\n});\n```\n\n### ext && excludePath\nIt is possible to change to output file extension and exlude part of the path.\ni.e.: You want your destination file to be in `resources/assets/views` and the folder structure in there to continue from the `resources/assets/pug/{..}`:\n\n```js\nmix.pug('resources/assets/pug/*.pug', 'resources/assets/views', {\n    ext: '.blade.php',\n    exludePath: 'resources/assets/pug'\n});\n````\n\n## License\n\nLaravel Mix Pug is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).","readmeFilename":"README.md"}