{"_id":"ejs-webpack-loader","_rev":"3-077d219ed09046269c52d0103ae40918","name":"ejs-webpack-loader","dist-tags":{"latest":"2.2.2"},"versions":{"2.2.0":{"name":"ejs-webpack-loader","version":"2.2.0","description":"EJS webpack 4.x loader (without frontend dependencies)","main":"index.js","scripts":{"test":"cd test && ../node_modules/.bin/webpack && node bundle.js"},"repository":{"type":"git","url":"git+https://github.com/rorkflash/ejs-webpack-loader.git"},"keywords":["ejs","webpack","loader","template"],"author":{"name":"Ashot Gasparyan","email":"rorkflash@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/rorkflash/ejs-webpack-loader/issues"},"homepage":"https://github.com/rorkflash/ejs-webpack-loader","dependencies":{"ejs":"^2.0.0","html-minifier":"^3","loader-utils":"^0.2.7","merge":"^1.2.0","uglify-js":"~2.6.1"},"devDependencies":{"node-libs-browser":"^0.5.0","webpack":"^4.5.0"},"gitHead":"c4a9395980ef6b05f8c881ef3aa93c21d89a5aa5","_id":"ejs-webpack-loader@2.2.0","_npmVersion":"5.8.0","_nodeVersion":"7.2.0","_npmUser":{"name":"rork","email":"rorkflash@gmail.com"},"dist":{"integrity":"sha512-nEBDmy1tkZD+hb/+JXS6jfvGU0rs/CWgIy+4PA+JfLaBE46ZBm7BDCLUL7X2sp60mTKMvQXlc+m9jKiOH5bVew==","shasum":"a1a19347b9afb4313b404d881f2ef0c2339f4583","tarball":"https://registry.npmjs.org/ejs-webpack-loader/-/ejs-webpack-loader-2.2.0.tgz","fileCount":12,"unpackedSize":5665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1lyDCRA9TVsSAnZWagAAbscP/iHyTBRGekk3YhX2ANkw\nwOcl5Lr8yfYXwD+/1geqe2Dau1M16ZOX/Wow1GpK9mWHyOBJhnBMNw0UuS8e\n8sqUOem2xmE2yJBtUS/Ha738isvdKTbf+WJEUx3zB6UVmCpVrA0R8Z073M1T\nvNV+4BBz985BHlTti2rf2pQSVhLksoLQ7XZa3ulCl6IXX247JraPjoZEVS5P\n6tMqKyHXIkwvymRQuiuJF3X1jkK0PiskcXKwcTuQoOvT9QK90UYN1VVt77Aq\n4nYElyY/kNm09veyVJSXOSqV/J5B4rIStKLdeetsMbwElbEHfWObcokMUHKE\ne5sMxVnA6ZbKVo6qXtPtQ6QQ1rzDbfZYodZx5VGmkY/chh1MMCIsbHKDcvCQ\nTCXSw4VGd2KavtPeQbNJkRGrnnLv1KpU8dGLmgBMC0Ex4JI1H3p5jzEOJytR\naKKG2ByyQgc/GEFZSOwwWCBOd5c946suULjCG5FrgZud6KThKQyz3fTBSvzF\n8qlzt98TcI1clpnxQGxBZC9ZSX6KQNnVW63b1vtOQphjV6/itc9zEPq6GPEW\ntcpWcHqSPfsdxgRWRpSKmpC2GNN3DISdTjZvdYN2uNyPsi7fxIsCX8xAgFQf\ntxxM54N4Fx6eLOCzOKwz+o6FhI7Gk42D8jIe0PJqeXsSAidxF5hwEaFep0tv\niqCW\r\n=RW+e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRPWZfZrKpn4nV8CNCdXkWYeUSp/VFq7ANTd39O9yfcAIhANDuzNHUNS6nCcr0orXaJ3cG+OVoX61QLk9txW0e6HJr"}]},"maintainers":[{"name":"rork","email":"rorkflash@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-webpack-loader_2.2.0_1523997827030_0.6435517357432099"},"_hasShrinkwrap":false},"2.2.1":{"name":"ejs-webpack-loader","version":"2.2.1","description":"EJS webpack 4.x loader (without frontend dependencies)","main":"index.js","scripts":{"test":"cd test && ../node_modules/.bin/webpack && node bundle.js"},"repository":{"type":"git","url":"git+https://github.com/rorkflash/ejs-webpack-loader.git"},"keywords":["ejs","webpack","loader","template"],"author":{"name":"Ashot Gasparyan","email":"rorkflash@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/rorkflash/ejs-webpack-loader/issues"},"homepage":"https://github.com/rorkflash/ejs-webpack-loader","dependencies":{"ejs":"^2.0.0","html-minifier":"^3","loader-utils":"^0.2.7","merge":"^1.2.0","uglify-js":"~2.6.1"},"devDependencies":{"node-libs-browser":"^0.5.0","webpack":"^4.5.0"},"gitHead":"9e0e8aab0fbf6c6757f59f1bfe32768d7d22306e","_id":"ejs-webpack-loader@2.2.1","_npmVersion":"5.8.0","_nodeVersion":"7.2.0","_npmUser":{"name":"rork","email":"rorkflash@gmail.com"},"dist":{"integrity":"sha512-phcbE9etG2qL3lfsjr+pEDZww2wybBMgz5KGwCAE2LbMDDnKC+cciqeGJmrclzUUcsgW7j5UuDtgg/pzNIAl5g==","shasum":"52675f0bd27314b04d4378117422ce1c10b0a850","tarball":"https://registry.npmjs.org/ejs-webpack-loader/-/ejs-webpack-loader-2.2.1.tgz","fileCount":12,"unpackedSize":7889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1zzICRA9TVsSAnZWagAASnkP/RZwX5fxawpmzYW/2zNY\nnIYZKeE2kREiElqYEhJnPR+y6mxEOMZrOBfJTRrbet58FMsDQ/XGVNhSAvXV\nyqsrOAgoE5WgvDXXO18bD7TgQMS/3xUjCgHTShV0cZtD9oOxYx0YpuGQ47TS\nFJlGZoFarc2hYTVVwfvCymIX5Y8uj21ikj5ZOl3V/ZAsi/mVSrUJkqRLoblp\nSmgvS80l63P72ZpTV8K5MxcCt+6NWzC4dYqA3ZY6/d8go52H6ZB8Ghd6T/dB\nVpKDdXs9cZSzzKBjItHtigMeidMcKb71vu/IMkjO22HwGUIqEwKKHIWMs94a\nB1c7vbxPdlSFR3cO7w/9VIyp+NPAmDRdGLFnuRIkOdEgTFqSp11DhOthHFmn\nsuFE4gfTXabvooXU1GAkfVgOd6rmtI2gdoGPXHKMg56Kn+GuhGC8i546tdDm\nv+lCpT3LuITbx3xiXt4wka/3NE+RyikXnPvGuqa7RlUEMgY3mBCflQllljXW\nVdv91H1KwyPeeMhUzfA4XlhBUNN0RgzBSIUpLOTQQk9Gs8y7IupXqvZd8cqH\nha2XeOwlS2E4nAJFz65cHADNSC8oVj+UyC+RBEX6nNK0AJDCLTlMmoJrNK2g\nsMvwqEsCX6k+dZwtYTZxb1g7uYsEvJaoER4FZtycjMHzwpm/QflKCrnUZvPs\nRiKJ\r\n=vPfl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNJe5i8P+ZlnX7bNcVLNoLqEhKMMwJUi2XTGOfxzymUwIgdgDmW2/IQGXLG2MKF65Tqk9CDnFy4giaMZ/j/QWuFE0="}]},"maintainers":[{"name":"rork","email":"rorkflash@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-webpack-loader_2.2.1_1524055240125_0.19902080205032857"},"_hasShrinkwrap":false},"2.2.2":{"name":"ejs-webpack-loader","version":"2.2.2","description":"EJS webpack 4.x loader (without frontend dependencies)","main":"index.js","scripts":{"test":"cd test && ../node_modules/.bin/webpack && node bundle.js"},"repository":{"type":"git","url":"git+https://github.com/rorkflash/ejs-webpack-loader.git"},"keywords":["ejs","webpack","loader","template"],"author":{"name":"Ashot Gasparyan","email":"rorkflash@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/rorkflash/ejs-webpack-loader/issues"},"homepage":"https://github.com/rorkflash/ejs-webpack-loader","dependencies":{"ejs":"^2.0.0","html-minifier":"^3","loader-utils":"^0.2.7","merge":"^1.2.0","uglify-js":"~2.6.1"},"devDependencies":{"node-libs-browser":"^0.5.0","webpack":"^4.5.0"},"gitHead":"647ac3f0817b597e2b0d1b1c48a7f5944f061cde","_id":"ejs-webpack-loader@2.2.2","_npmVersion":"5.8.0","_nodeVersion":"7.2.0","_npmUser":{"name":"rork","email":"rorkflash@gmail.com"},"dist":{"integrity":"sha512-fuZ5djtVnvoMv4xlyQs3sh9JfIh167iPg7Q1ABFdQIbPHqRgeRWQCvodGybQhiRRCUIeqH9HPtfB8hJimPSPbA==","shasum":"0536acdd79ba4cdbefb4248fcbe7441e264955d7","tarball":"https://registry.npmjs.org/ejs-webpack-loader/-/ejs-webpack-loader-2.2.2.tgz","fileCount":12,"unpackedSize":7909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa16iMCRA9TVsSAnZWagAAensQAI30nsKNpbQnrMP25ziX\n4TsZhPTXqXfN5xg6jAuiQ1yv/iwfUHo0fO+oaVDPOMxaP8ZlK7/cXCngsKks\nwIvmrbxSkV3CJta26MFSvLFxzkBBfmKQBcDh8jfa7LmX01Rfaz4SylYjniVF\nzEjyi2r9VtyvJKKIwLing2GJSs9Cy/2qhY2BjuKoRrQlzjmh4VaAiZGqxAI3\n/6ZXsqrD8R5kNn+SZI1Iv1EsMExSgBg/+ji9/QwXCTrWJ4FisOTdpF5AXYdi\nlNPSIdLKFVSfpc7IWXa8rjZwQ+p/V2piufn9M13P6ZySNohM07R5j50YNTuO\nmzgdiiCDTLPvEGKf/t+nWbPBVBXp9GJ3MW6b9y16exBNMObPxsBx3XQoS8x3\ngJrKdCVZ2x/aeiyr0XODqxuSbM25FiWY5epBtA/lzAbbofsWd+R32qWnGYuI\nOoGxcymiNuW1Z/UqOX3lBUierDsRiHufA5zctjzzlPF4amzJOZp498+cgyx4\nmde1XyBz2PP555BleTBpHSmQik2GJd2Fb8JH7zThAD36GSN3vBr+rSl0aE3e\nmFnKRKZrSJmxHf2YiIeAh+1YRNekGHhRp5qFcYmKi7VadjNZ9eVMW9Xg2kKh\neaCB71i8Erx9X3VD7hC3hWABff0j2x1A0LO7a+Oala5nfTUrKkxs/9Ayul/g\n2dqq\r\n=P5OZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWWF08FtBLu0xonHafz7jBPrGcTYGgzsKonZcD9hCYMAiEAl5XUoEHtNyr+z6mPTVm9tMSBatLaeo0pddBcEifneQQ="}]},"maintainers":[{"name":"rork","email":"rorkflash@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ejs-webpack-loader_2.2.2_1524082827369_0.29269157917355315"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-17T20:43:47.029Z","2.2.0":"2018-04-17T20:43:47.200Z","modified":"2022-04-30T23:45:54.782Z","2.2.1":"2018-04-18T12:40:40.195Z","2.2.2":"2018-04-18T20:20:27.429Z"},"maintainers":[{"name":"rork","email":"rorkflash@gmail.com"}],"description":"EJS webpack 4.x loader (without frontend dependencies)","homepage":"https://github.com/rorkflash/ejs-webpack-loader","keywords":["ejs","webpack","loader","template"],"repository":{"type":"git","url":"git+https://github.com/rorkflash/ejs-webpack-loader.git"},"author":{"name":"Ashot Gasparyan","email":"rorkflash@gmail.com"},"bugs":{"url":"https://github.com/rorkflash/ejs-webpack-loader/issues"},"license":"MIT","readme":"# ejs-webpack-loader for webpack 4.x\n\nEJS loader for [webpack](http://webpack.github.io/). Uses [ejs](https://github.com/mde/ejs) function to compile templates.\n\n## Installation\n\n`npm install ejs-webpack-loader`\n\n## Config Setup examples as module loader\n\nejs example\n```ejs\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title><%= title %></title>\n</head>\n<body>\n    <p><%= someVar %></p>\n</body>\n</html>\n```\n\nwebpack.config.js\n\n``` javascript\n\nconst path = require('path');\n\nconst config = {\n  output: {\n    filename: 'my-first-webpack.bundle.js'\n  },\n  module: {\n    rules: [\n      {\n          test: /\\.ejs$/,\n          use: [\n              {\n                loader: \"ejs-webpack-loader\",\n                options: {\n                  data: {title: \"New Title\", someVar:\"hello world\"},\n                  htmlmin: true\n                }\n              }\n          ]\n      }\n    ]\n  }\n};\n\n```\n\n## Config Setup examples with separate extractor\n\n``` javascript\n\nconst path = require('path');\n\nconst config = {\n  entry: [\n    './src/index.ejs',\n    './src/main.ejs',\n  ]\n  output: {\n    filename: 'my-first-webpack.bundle.js'\n  },\n  module: {\n      rules: [\n          {\n              test: /\\.ejs$/,\n              use: [\n                  {\n                      loader: 'file-loader',\n                      options: {\n                          name: '[name].html',\n                          context: './src/',\n                          outputPath: '/'\n                      }\n                  },\n                  {\n                      loader: 'extract-loader'\n                  },\n                  {\n                      loader: \"ejs-webpack-loader\",\n                      {\n                        data: {title: \"New Title\", someVar:\"hello world\"},\n                        htmlmin: true\n                      }\n                  }\n              ]\n          }\n      ]\n  }\n};\n\n```\n\n## Config Setup examples (via HtmlWebpackPlugin)\n\n``` javascript\n\nconst path = require('path');\n\nconst config = {\n  output: {\n    filename: 'my-first-webpack.bundle.js'\n  },\n  module: {\n    ...\n  },\n  plugin: {\n    new HtmlWebpackPlugin({\n        template: '!!ejs-webpack-loader!src/index.ejs'\n    })\n  }\n};\n\nmodule.exports = config;\n\n```\n\n## EJS Example\n\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)\n\n``` javascript\nvar template = require(\"ejs-compiled!./file.ejs\");\n// => returns the template function compiled with ejs templating engine.\n\n// And then use it somewhere in your code\ntemplate(data) // Pass object with data\n\n// Child Templates\n// path is relative to where webpack is being run\n<%- include templates/child -%>\n```\n\n## Options\n\nFollowing options can be specified in query:\n\n`beautify` — enable or disable uglify-js beautify of template ast\n\n`compileDebug` — see ejs compileDebug option\n\n`htmlmin` — see [htmlminify section](#htmlminify)\n\n## htmlminify\n\n```javascript\nmodule: {\n    rules: [\n        {\n            test: /\\.ejs$/,\n            use: [\n                {\n                  loader: \"ejs-webpack-loader\",\n                  options: {\n                    htmlmin: true\n                  }\n                }\n            ]\n        }\n    ]\n}\n```\n\nSee [all options reference](https://github.com/kangax/html-minifier#options-quick-reference)\n\n## License\n\nMIT (http://www.opensource.org/licenses/mit-license.php)\n\n\n\n","readmeFilename":"README.md"}