{"_id":"@aofl/templating-plugin","_rev":"128-82be1d96b61feaa452abdf82f99bc9db","name":"@aofl/templating-plugin","dist-tags":{"next":"2.1.0-alpha.13.1","next-alpha":"3.0.0-alpha.12","beta":"3.5.0-beta.22","alpha":"4.0.0-alpha.45","latest":"3.14.0"},"versions":{"1.0.0-beta.21":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.21","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"543db94038795e729550c71ad8156cedc0478429","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.21.tgz","fileCount":4,"integrity":"sha512-cml461CGoieMltL4YtJ4qf2WCjkcHX05M6gFuTQCVzqkFdaDeWmI9qZI9HPufJOGi8a4rB4AeTFOe5p0ixstcA==","signatures":[{"sig":"MEUCICUPKVsVjz7Idy6s1NtjKzHNG83n5Uz2Com9OMQX3H2CAiEAzwUH63O5CgFwNDNGRE5oNp8xR+yFqkls4qN/1juGJWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZqo4CRA9TVsSAnZWagAAWkMP/jDe8ZBCOKOCXnQPpK6Z\nB1pssOWy3vei1qVkd83kUVTxYEm1VPRIcMBqYgYUiRrsi5n3pzRkpEoxhouW\n8BsWjglr+Dc5MUoZK5B1HkxXKqWMalF6bW/7haHYl8XAskz7KQsPkSF/fI/d\nNghGubP/BahjuOH96iJXl7zTKUK3K1SLXSxQma5Wes2WiyMGHkgLXQEM+hnA\n8e8QopLezj9PIJnP61vTNuzhcEx+4bCDKCWVG1yKDeyGjsp4VWAeDVE5rs04\nJZNNscnm/DT/px6nM89WCm72GE4VsU4iZvRVgzdirVEnsh5AhGnXLXFJC7wi\nF0BfW932rHtLuloI8JNTaos+4Sco7EATF8c4EbBTXgUlSt1lI1f8NAk//NVe\nm8ELc8inplA/K6LuOZTXJKVEImfJcoy2diQt/CKgwmpBXvEJXzEWA+G2oRDS\nOGV71so4nIjklsxRxmvZ1A6pyD1/jSsZDO55Poe8uqR842SCo6nG+p7cDIQL\nRtK+wxivRlFDOEhJDts2JPmxbzqZ3LnZnVVaz6gwgHwoK6MY54vcH7ODeDHX\nysRsutSZLZ+q4+BPMaylTbXUore9e1FVciZ6fa2HGTwjrZdv5jt2nbBJ87cQ\nrXh9FWfSlo8+LIESybnolfVDGsnvJBbU17gP6guVAxXmenUMFdS16aNRF7YD\nCswJ\r\n=HRpj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.21_1533454904132_0.35820236129587957","host":"s3://npm-registry-packages"}},"1.0.0-beta.22":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.22","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"bd705c4854b58aed80beafb870ea2e360a73d8c1","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.22.tgz","fileCount":5,"integrity":"sha512-diyYBgbgEnN3CnHErFUhXDl5p9yAJX1clwrCrEqL3tywEln6DM3jwbVFNq2vjK5YqMZVCDQKyNVSUgxXMNNfHA==","signatures":[{"sig":"MEUCIElIeWy5bSdtEjQKNXltlV1Wbn512uTRL7gBPdVJWrTBAiEA/YKVhPqlyCVnIAwPrnXtCGT/Z5ip7+PijYGmZWpkQyA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbeglCRA9TVsSAnZWagAA5RAP/2MlUfIDcXr1sRJKlVYn\n10t8G3cxGG/44G9SCLqW6X/0vX7mLtRHW7OYoJqy8k6i3RBEH6kPONiU0/pg\ngayVwFiypFidXhfeK96oa8nIms0a3ooRxMuXc9xXAnILe+jpl+tYFJRGl/qP\ngpfaObIkXpfGnNFbpuaXlNW/Zw5n52y9CC6B5kT7mWJtR1GyIVDcv+t+AtIO\nZD+5mOjAldZXXX4aWtA/fvMjL9yzeaIE5oimFiKtr6FNTMBfP9/h4jkuIb8b\nNR7/vofcl4IWfmjQfy4o1tcJdVZK11LsrDz2Zl5wXgsjKgEF+1TEsJQ+a7q0\ntal/vTKDO2i/XnNQW5YT1xsWq/3Yk94UVMO05eyTJxzCBZDcTlLNxtKB0bm3\nl3x2GeqjfAxiykLe9t/3YFA1635wJyrSheq9t3/XQz3tH4yMvGBjxXjGCm7Q\nzBQP40wOL2RJoRpwNaFltzHPK/LRyZ0euPtc/8jHrR69PKyr4ACWMWqGwMkI\nC240gR0kbb7GaR3epxP1kl2kdw/o8nXpi6p5H4lqi8jE8f738LLoL5KkjqVz\n86N7cq3zglMLqIoB/CMCqGpZ0vYvX3E6cNcItDiewddJNxOatHWG8HCeCDZ+\nGjJxnW/k+BaogrCkzPiTh2cLghm1fccClZUV9KsZ13Fd2CLEXphXDlMNZroR\nmF76\r\n=Ct2U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.9.0","dependencies":{"glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.22_1533929508913_0.5061857866227928","host":"s3://npm-registry-packages"}},"1.0.0-beta.23":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.23","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.23","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"76958c9c636992151871c894d531a6eea63bec20","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.23.tgz","fileCount":5,"integrity":"sha512-gqvIEJaCocxb7A8OCW2n0IPU1wJTf93t1yrRwCXiV4r6Jq4W+Zk5+J30CfY4x6mVQOupaOPK5wK3wiWODmxL0A==","signatures":[{"sig":"MEUCIQCJp8huupaLw/QczLXNL84Qx2dpJV6dMXbigI0rbiGaKgIgAV8c9zc5uSvxz6UC7DXTDVw1t7W6bVCMxZ0IFvBQL3g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdfBrCRA9TVsSAnZWagAANKkQAJ/q+Jlf+f/qshvrmqGp\neZ2e9K2+b7q6sr9J22b8G1HlSr3PzBYytXi19Q6Cjw0FjhGdFtkwL0IL7HDn\nX067l3ghdfzKFahzfi9+9g97m6MSMbr+XGU8r8m/qEu701qGKuYHHLCWe74b\ny2aLAXereNwlQ8ff1e9g/EhvfKVyeYk8hoTL8bXnq2PearTbFRMjX0OMsrOs\nZg29cnuh07n4oFblC0Ipm+/8REBFmpa0sadBrwTT54IBLO6yigraeenegFZd\nwUyC9MhzzvpAxwwJP5+8Odk24J7+AM/8BeNEs85OQuWOghfAH/MLti379dDd\nU7/ZplQiQooy8QV+T3E5h4KueMsHnnWzsHp8TxFk7JshgtARBH5IbXPmy3aG\nTE9DjH+PlSa0lw1L1TiP2MHpMyYD1k4zN6qYGAjeelDrRfxMOexR8HJ+oTMN\nLl6ydJnYnLqCuOZ4oq6SLzfV2kzRcb39vcjWAwFMyLuFarfeMYvB4R9HNALa\nMldbiRsxa0e+RLmFHbqQKq88ikCxOcjjO5xgj7n7Z2FI743mkWxyseBuRo3H\nN+fbIAtdSJLkZ9SyDn8yecTxkQg52ehYMIGsvP95aEMRLMJ4yHb7iMTzOiMr\ndj/X4ZpYFhWdwwQztVrGo8ENl0cC61vF2QDhDxxUkiIc3zYKXJXvNM72Hwzq\n24Lt\r\n=WOck\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.2.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.23_1534455914415_0.7934268188722486","host":"s3://npm-registry-packages"}},"1.0.0-beta.24":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.24","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.24","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"e5b3e861e8967edbce4eedaf5fba40e142b7f199","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.24.tgz","fileCount":5,"integrity":"sha512-aCGwVwcKDhmX9ML1uv5BHn673gGZFTybWhDQpXX6Y7kicjhd1m53rP5yfO1OpAp+AXT6rmza0FyBoQDG+3EzYg==","signatures":[{"sig":"MEYCIQCyQjcP6LNBI0VPphHXLiKoY/4fBNhCnDVjVmSxODtc0QIhAOdSde8wwoKIKvE74kExrCECFAB3mBVOsBTYSe+/yIE7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfeVrCRA9TVsSAnZWagAAaGAP/ApLn9xTdJJErdzPp62R\nRcjagqcm9ZSeL32u1Aggmbq1rKogtoE6OlyhXCSD4QECef6I0gLdvDPYQNlF\nxGPKFaKKbf6Apw3p9QiPs70Clb5R8SXBN2suM+idGQmjOt/N97BQUB1O/WFz\nZDGBUPfKYvDFagwn291sgu830CfJ5vZNkNu8SPRXtOS2ekWjiemm+khzyqZI\nT7gwOkyc0FwWnYyazy/XYDF1LLWxdR2v+zSBs2SkJQkSgCuRBLbSfzWkhTph\nYk/rZKQ+Lfz6F+ibtFndnqDPa8xMvew8gjp5OAn2M7fLFCxKEZeQgceOaF+U\nY9fgX/+mVD+uk2D02w3i5qgoUZ/VqImco/SQ+qrVl0zBV/96GYHAd/7BQFPM\nI+LYCNHvEmcL41ET2/HlOpKrJSga+uU/TDAcfhjWtAd68Sl55H8CwShkjsVD\nWZf/yKCTpkMBkGgdNSLNat97N/FxmBLthEQgJAooISz5JSKUcg4DxN4J8xgu\nPIb0oiXGex59vNrHq2mPHvGmpL5y5cQWydOn2mLyzd63NEOdQPL3hnBsdiYv\n+N7n95NZh5MmarWEL5l7a8gMS24aNcI/8DghYeVxGcv4/vBq7A2HwxjALuZ1\nQo8qq36lRzezZQJQWQjpi39xgq9yllbqfMd1oGW/uQPSZ2YzEFklIuf5Ewgv\nkhqX\r\n=E2p0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.24_1534977386961_0.037836037848738124","host":"s3://npm-registry-packages"}},"1.0.0-beta.25":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.25","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.25","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"d902501f99711b69ba633390d8f97334a65051ee","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.25.tgz","fileCount":5,"integrity":"sha512-68M7riqJKM/qrQRemtG6wbYdYkM/GQM567YklFNI6lzMgC31QPlLku46Uxaa6haQD8xj8Fed7IK6bhzrIwQ0YA==","signatures":[{"sig":"MEUCIQCH3pQsz8jsSoi4qz2u1pl22dLNyyzI0blUtnY/jy8t+AIgCnuThQf2qa8tz4fG1hhC/6L4x8E302ADPPZXE+eoR6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfwuOCRA9TVsSAnZWagAAQzsP/j0OP39m7Zvh2UsiBLtz\nb7w2/r4FFSrgZQzR/YhnZ2tRqkotxcJVFnYgY73bn8/3wOtVIqhyPvZWpfjE\niN345IljhDKJsvzvQcr248phLLAbxpOS7bRqGBuKYnYQfYvQXH5auAyF4FWK\nkx55eWH4Gl8D684Vs/CRBdhPcbf2Pzhd3Cr1Xva2ytYdAy8J9QKPIyojyi44\nAiEs5SsH8koGvumQZQWNjPkLJFpO4NHmyT4ixOlVHXoPThH9quzQhGJWLF6F\n0c2FAgrWr6Yk1NuhXvOoI5MJ7QFBbWmH7J37DMplJLLh+4qbGbg+LoSD8VQn\niHDSaOcho0uQB3IA96XFT4mrcHAVcczss1Q/cEIV7umrT0tDvk2OF9UKhHej\nYC1SMxMn71GtQjLmygExS6QQ99dBDBpG1mgu1TvXoxp+iK0iE6OBKwm1lSYv\nJSj8eevKSuoe7bwyJ5mKAhG9x/LVUqwOyPXzA/v6uHNTKIgTQ5SMtF3apgLC\nW0IqQs/z3b3ZyzDm2uYZ+x1PUjb15T2CFgLsyk0OnBRErPMA/UA9rnO0vSjE\nY49NnL2GljkhynUgQ9pa9JLvooB87YZdRiU4oY167dN3h70Jx+9KJ7Tx8ZDc\nlI260iYnx0j8E5VgCg/uVwld7Y45S5+BgnMHk7U5Gb4K00afqB/oLKi2Yp+Q\nArhW\r\n=BO/n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@gitlab.aofl.com:CoreJS/aofl-os.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.25_1535052685756_0.6268467728830718","host":"s3://npm-registry-packages"}},"1.0.0-beta.26":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.26","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.26","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"16ad434da159cd3ba1eb2ecd1fd91c8639106324","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.26.tgz","fileCount":5,"integrity":"sha512-8Bi7Pm5Kc3rBlEatF629slEP5iqe1BmMwLyyakPoan2RxIKyi05zLKeRZjkSYehClpojlZ5xwpOxcQHEl8LhlQ==","signatures":[{"sig":"MEYCIQD1Qyq057wc3cMLtajdGMA1K1UO1LnFBGyMrLcX0dcU4gIhAP5m6aJO9jdA0Hy07/uKGMMY5GqUHg1OGR69oyegATew","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhEGhCRA9TVsSAnZWagAAsTsP/Anki+PkXuuj4jroWvvt\naF0QehozAU2ygL5jBBNnXSknPpvEje3s4lfvXnFdKifleKKdhwJhrxScF03d\njfDWpHlulYi28luNaB5JGiyll02ZcT/VJ/nqMESryZ/VyyCI6dumBjjygALX\nnjU2tG2jdVTbYTMBLPlzfDIJWTew6ef+LPmyAvM+AARiHxyDcn/Mt8UlzFTl\nghsdjjgzP/9x5AzIwJMNaqLBz3cOh05PahnUFaO9b9fuBPojqDsfnEeHDjEs\noryRmN0V9aInsJXsJ7ixQrl5NXDNZWntM7wrUXTSC4tJGux1XFAYTRVDLSy4\nkWochJe7XylE2FHPDXPv+6GWbzrIvSuEEgYvKjosOXT1VGMUg97gAe7Z8pkR\npuJ/oWtq13pe42jcOri5+zuT+DEmkdFX1bXbGvjhngFBLrcMs78kp0uukqWZ\nw3NSS3s6funJanXYTgap0QlflkXNWy/63CCQYXA7D78SJVXxDW6FV7/d6XTl\nblnfwaPaPRMyU38KcMCOuTbn0ksheb70KjufqoWjUi+FDxN7zw1lIYDYM5gu\nfCyKjU5Nyvzx3Tv0vl3an9M608tywMqqNgUBk6X7wo9ksTKobqst7d+U3ZpB\naQXbVLaS0GNufDmJ/4ZvZ2Fp7r6wVkJgYV3z8H5j6UUawtehyRLCQZX+TYSb\nzOdY\r\n=WReJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.26_1535394208169_0.40393444458010697","host":"s3://npm-registry-packages"}},"1.0.0-beta.27":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.27","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.27","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2f03c32b2c3fe3706485592ec7fbec43de8949bf","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.27.tgz","fileCount":5,"integrity":"sha512-+u/0sA/AkcPhv9Xngy503EO7+lHPI3KDYrE8962/6DjKpWQBynpCMeuFGBkfdWLSRHRSfRe2v/Ay6g7x1q7umA==","signatures":[{"sig":"MEUCIHksBj/CCSZVINsA5RCkbE+r0i9qL4eOyPvkCJsVZe/HAiEA42lcUGW4FgXbUMTJ5PISOxruozh0l3klfyBRYwosTqY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmATxCRA9TVsSAnZWagAAbd0P/0E4DEWPiK1DtgfT8OVs\n8SUTm6Y38cBUuymaNGXvirtqjHq+tvStnZvJP8smFu2+kVSa0I3tfyb6blPw\nYdXw9I5tJlRTnoHsdLEOqXBpm1DdEk2lY/M7kc6B/EmDmrlvDkRMW6wFVEzJ\nUlYJdWx1HDxCTepTndqKdMXARtW8FSD6q66Gp9e5RUwtAMMe6FYUTgM4WugS\nhFf6uL3pLDn43VtUDIxL/BGHJb5lUpoV+OsjmYPzuL3MT6VoRFVO6D1WAD1b\nKQh5bPt4nqEpwQyKQoM/s84TmOFMckK/eXLl3MCVXWbVTteVuPv3P6PtVo77\n9ecHonIr+rvFQlzXYXcmKaEKiSdlf1SC9KNlTKBPWzYmm/phMQ+is745fRQM\nVbJpvZfcD8Nks88A884uVW/lUJdI9xryJRHtdJ/iq2WLum+DA2xGRBW04Dda\n0b2OT+X/sZ+8OfiPsbOBtUpYMUb+LpUF3Lj3bhGEawSBWgAgLDn8LUrFxX7f\nSxmz1hrwHWRuRn1B+ALiQ+W8xZuHTPUdWTNg6TTOXVM6b4z6a7EtLMK6g/i/\nEPQ66eIc0rpTos5Jb/SVhe1PqQO3ZBrxvYnzY7JbXI+CHF8xETDWJJbwaZCB\nGdUOh860ej0x58IjB4iBUBB2G1+hpfUzckPNfEbU0LCXiGduuaauKlc8jkTL\nN1Xf\r\n=Og6u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"ERROR: No README data found!","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.0","description":"","directories":{},"_nodeVersion":"8.11.3","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.27_1536689392947_0.16926396417545497","host":"s3://npm-registry-packages"}},"1.0.0-beta.28":{"name":"@aofl/templating-plugin","version":"1.0.0-beta.28","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.0.0-beta.28","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c66f8264d4425111aa28c303535e806577404045","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.0.0-beta.28.tgz","fileCount":6,"integrity":"sha512-GWoFSSiwI8sOAm9r6U+t/6mkua8VIGB4vocI6XTz90Y6xdQ5BTSuTkGrXNOLhh0q1bC4udSsAZ2mPdFPIVdYqQ==","signatures":[{"sig":"MEUCIQDgvvMklU7W6K8b9b3A0BmYdKnbAv2VIEYe0VMYDS45mQIgJJRHAmoiMvzvhZz6yju4xt6F1mS2KcPA8Cd38VXyGj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrXMtCRA9TVsSAnZWagAA/IcP/2olstIPtI1MOFRkp7QN\noSdSbHFKwd6c+WVX6HQmJqOjY+YW0VBRR87PoN+QJtdV481oAE3jqGNQSvkW\nomJR7RZqhTRx3bk71Opaw6SSlpihoLZiRETYqdIQTLh1iwsymH84RbGEFWOT\nGkDYaC3H4CN8NDk8aPRMqjnsHO4UTa7ShEqiGfw5Hixwc4uUYjV2S4fGkN4/\ny+BxSe7UcyNCDcu+OSoM4uvb8mpyMQ+iXWYYuUQFhPEjO8JiApPRTGqKJGVa\nS/rXlLSGZ23rajIQX0XqDxrZGiJ/eM+Zrjfogz0KLw8uQruQG0TltEqA7GPD\nkEYR2SO1UJ0Fxwm6iIw25vkBgJ92N9w9PWElh/iEtVlnCiEDzDYNlEvuPg/H\nCc03o9l4TeSZSSYJ0sbo1vqFSjpvYPqXtIyJBCU6wF67FEz/9SCyD5tX3kPf\nDZQ+ItjcsbIAqK8/JGORJYQ95QFxZe09E68cphS8kavvZT8qI9BXZYW9rzEI\nLHbsUJ8Nqwv0AGZZpuMYOhmjaJ6Wo0FLJSiJYhYvrdm7hi5Pt/hQsX0W41c7\njDOV5Y1smKUhpfBhcxEjUp4Ljf98ftKBUL6S160ztlqwiccutvscKXkjnm3h\nkqGLSXCY1gKTOOJvH/cuyUKWqzXcwKTrbM+cHWDjyVaNNBkgxy593Cl0V4/2\nsSx2\r\n=pcYE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin works along side html-webpack-plugin to create multiple entry points for aofl-js applications. It uses a single template file and mixes it with static partials, meta tags, title and locale based on annotated routes files. It automates the generation of routes json file base on the routes files. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst htmlWebpackConfig = require('./html-webpack-config');\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new HtmlWebpackPlugin({\n      template: path.resolve(__dirname, 'template.ejs'),\n      filename: 'templates/main/template.html',\n      ...htmlWebpackConfig(mode) // see [aofl-starter](https://github.com/AgeOfLearning/aofl-starter) for these settings\n    }),\n    new AofLTemplatingPlugin({\n      template: path.resolve(__dirname, 'template.ejs'),\n      templateFilename: 'templates/main/template.html',\n      filename: 'index.html',\n      mainRoutes: 'routes',\n      locale: 'en-US',\n      inlineConfig: true,\n      routes: {\n        pattern: path.join(__dirname, '..', 'routes*', '*', 'index.js'),\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    })\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default                                                                                                                       | Description                                                                                    |\n|------------------|--------|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| template         | String | template.html                                                                                                                 | Input template file path. It must match the template option of HtmlWebpackPlugin.            |\n| templateFilename | String | template.html                                                                                                                 | Must match the filename option of HtmlWebpackPlugin.                                         |\n| filename         | String | index.html                                                                                                                    | Application entry point filename.                                                              |\n| routes           | Object | ```{   pattern: path.join(__dirname, '..', 'routes*', 'index.js'),   ignore: ['**/__build/**/*', '**/node_modules/**/*'] }``` | Patterns for finding routes entry files. These files should include the routing comment block. |\n| mainRoutes       | String | routes                                                                                                                        | Name of the main routes folder.                                                                |\n| locale           | String | en-US                                                                                                                         | Default locale for the routes.                                                                 |\n| partials         | Object | {}                                                                                                                            | Used to define static partial templates.                                                       |\n\n### template & templateFilename\nThese optionsa are used to identify the template file and accessing the output of html-webpack-plugin.\n\n\n### filename\n@aofl/templating-plugin will create entry points for each route and place an entry point file in each directory in the output folder. For example, in an application where there are a `/` and `/about` routes the output directory will contain `/index.html` and `/about/index.html`.\n\n### routes\n`options.routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. The other folders will be added to the routes.config.js file as rotations (A/B testing).\n\n```javascript\n  ...\n  routes: {\n    pattern: path.join(__dirname, '..', 'routes*', '*', 'index.js'),\n    ignore: ['**/__build/**/*', '**/node_modules/**/*']\n  }\n  ...\n```\n\n### mainRoutes\n`options.routes` specifies the main routes folder for the application.\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      pattern: path.join(__dirname, '..', 'js', 'header', '*.ejs'),\n      ignore: ['**/__build/**/*', '**/node_modules/**/*'],\n      filename: 'view-[chunkhash].html',\n      static: true\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n\n## example routes.config.js\n\n```javascript\nwindow.aofljsConfig = window.aofljsConfig || {};\nwindow.aofljsConfig.routesConfig = {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin works along side html-webpack-plugin to create multiple entry points for aofl-js applications. It uses a single template file and mixes it with static partials, meta tags, title and locale based on annotated routes files. It automa","directories":{},"_nodeVersion":"8.12.0","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.0.0-beta.28_1538093868710_0.4158740600125521","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@aofl/templating-plugin","version":"1.1.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.1.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a9c7805bfb22d745c6f0af888cf87ec9cd1296cf","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.1.0.tgz","fileCount":6,"integrity":"sha512-iLVqbfJX+fUL4VaxpPlaP5yod6KSzeRh/oKXj719KhUynjpFLeFmmxim0/JxNB8GUiPfJMw5VjBPNTYIwSlo8g==","signatures":[{"sig":"MEUCIH2CY1+Wk8p5ufVY5Y+SXs8qgvnRpflHBZ+qAb+1zvrXAiEAtFDpLT4lCpyU+/ioqeeTKpumVCpGNMEX1QduRLj4AJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx7nkCRA9TVsSAnZWagAAGJkQAIQ0JmPQUl7RlO1yYuYG\nDhprj6kcpzY3/rxlT2ZurvMIepr3gCdTjDaDzfTGBlTA4+jLL3yDbVTJbXGK\nG6eRdkBsm01txV+0HZY29y3fxoYbS3M/ju/oFZBFiLtthK17jnt7nTVZHthJ\nBjpljMERK7DcFCXHS6On61Ucch0Nj9zDQ+3edOL2o4HI4CO/aLRSkKPNe9Yk\nn0XJUaM5rNPS8You1DE6VEc+0oLUdsHubOjC7EzNljSurRdw4t1Vb02APDgx\nUpE3sEaHQpb6iW8m5PVPPkQPQ1l4a9434oHaW6lOQt5G9XRVbuVwzfATACE8\n9zyoo7OJpqhJBJHRUxwlrxGaVpRFtXi68g6E+0ew1ADNJrc1ugLP4r2V7Wee\nBGl4okW6uc8RYNN9UgOnX927p5oXTvWE2+tgDKYbyhjH8u781SQbruOK64hr\ncweaK1HMkWYBLjVA9Lc4Z9GN4YH5OVDrbxeRexzAWaQJuNZRdj8708pex2WD\n1oojkjE2jdJWgZjbnAnGTGdGiDpAY3fzhl9g3jwEuo+WpYKHujHG6FXUbKEE\nzg+wQYU8zKMqkzem2hl8HLfwBMVZKctoA3gcZv2fiBk+h5oihnMY1LrgzcKR\npQTvQS6PWImUChqp3mlRARgXDWDTP3qaTvLU5SGYhrtkbzj1Rv4Ez7LsDKsQ\nOjer\r\n=04Vo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin works along side html-webpack-plugin to create multiple entry points for aofl-js applications. It uses a single template file and mixes it with static partials, meta tags, title and locale based on annotated routes files. It automa","directories":{},"_nodeVersion":"8.12.0","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.1.0_1539815907661_0.36160290070849666","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@aofl/templating-plugin","version":"1.1.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.1.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1cd74e5c1cd3018514d2c0e5ab5d7da64201e935","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.1.1.tgz","fileCount":6,"integrity":"sha512-1UYJLcojGP8MJfpfzlJBij0+ISrlc6ZapXlMxzkyjJVY+FVOcX6ZkMX6wMcI+JunqY+cbGDOiCbrdns7BiY1dA==","signatures":[{"sig":"MEQCIAckCllUiBswcWnApQoYJf86052BfcRV0lTCllymhtVkAiA1gxiOjn9+ybsV0fPcWGvod7PM5qKyiF/hCFs6IYTqkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyRXKCRA9TVsSAnZWagAANJwP/ApUZT+POq9SnXxS+zZ3\nrP3ai8WdEONbeL2izQ71ikKCrDVvucUyn96tEkRjFFpdWFIqnUwytS5POlSP\nAzPxMrkvzxEyXxg7LlOJ2Xs66hiSfq05ifMn+kmQNuEdKU+dVmPBWdteFpmX\nwphLa3gf+ARYIDh+LPRw3VH3WHPWm0+iPyv7lmr2hQeg8FL+aqm6ZVr0od9w\nRYLjuBqRYst7bHBclNZyGdZlfgpYZT4mT+6zM6DTCbI0A4yvBCbJEJI3SKtk\nC0A286tFLfRpS4YH3igSfxxC2NOtdAuOMv0+KgtlvEydSnYKvxoORZZVdHom\nbaRlRiqHbQ1GhvvWppo4jn4CZee7ufvdTO1xqTxVRz/MIgZX53xFyZDZl+AN\nV3/6uZtqKXsZ4q1rH0/bwSIzlJn3bZLTZXC/9f22NsYmjhhjrX0u4J2+udEI\nF+rYDm3xYX9cpGpVy/RRvyWWtuo8fgH8rfsoYd5CsvGJkUICop4m+IpyWwlk\nnMiXAF76XckFHc5HJWXN+r6HVYWO9nJgdvWc1OA3qhgbqBQpEaGv2hcc0BYU\ngauHpZAm7oTKPg3HfrJLsmjhiVXj+1MYSBAGPaxIiw2Jlxbh77Wvyl0nJEjM\naVBb92ldPbZK5BArg00VBC2JB7Rd8OP7Bbwl8Oc6pcFXx2z6J1iAqvKwAW8k\npx+v\r\n=9bRn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin works along side html-webpack-plugin to create multiple entry points for aofl-js applications. It uses a single template file and mixes it with static partials, meta tags, title and locale based on annotated routes files. It automa","directories":{},"_nodeVersion":"8.12.0","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.1.1_1539904969500_0.9393087713778017","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@aofl/templating-plugin","version":"1.1.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.1.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"532b5d7a695e25e24b8bb6d92ae09057bf1d96c6","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.1.2.tgz","fileCount":6,"integrity":"sha512-IOSMCHD8JhitD2QKoaMJqQFT0hvhcKLCFWVGjIM7npHiLrvwnz+qwfjnvPPLNM8LnUPq+olYmQ0VqONdhE+a6A==","signatures":[{"sig":"MEYCIQC5Ns1sNotx9qiAqjhSxfW3c7KHElp0cTPToVFezdoKPgIhANWRTTe3rWdjVkWqH9PAgXCYXIX66ng0XqMBdhn2DP2B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb12QfCRA9TVsSAnZWagAA4UMP/iRpuFSsDpplAu9UH7VQ\nupyFPeGe8sd+LLFq9M0Yiho+D8WHeIP7UbtY/iM0E34AU7+0ZBgr0LADZg18\nYAwy0Y1UvSA4NWSWhp7wM9PCSlNEtA8hM2ZmB1Z0w/bDcaWR7ks3SBApqTXh\nFrQ1zWFfGdeHszMlFyDoeywabDnVYQnL6MD7/1ulgtSNyZH6jymKJjMpPr+J\nCI0Qof55nhO4ag7sxBAPv+fC09dZrVXk6ahUzoDczsAf4OSFJFwTcDBSEYWs\nULz1n1OanAAwRLKrc8TnfjEpwchgaq1KV3Cjzbjv3mTbPJM1aW1h4a0mO5ju\ngxq5GeE9KpfeTpOM9Uko3evHHrAnbV7Q0xEQLRUxjmL7BO7bJzGPfUt/ABrN\nG2P99tGFOf7Ji8VL8bEoziU649qXP3qXTnQ7LkxKGtXfBycW5Hr4+DNlTyqJ\nQvBrR+1sIpth41wtMdtCycfk42b5yazQ770/4ko19NrqO305pzZgLbGc2Ix0\nm/7rWCgJAs+85X5wXASGCErMh0+O6V+jJiyEtAm7gjJKvvJ+vDEQDzBs01f/\nYtfAxcz773PT9PKz0P/VBL4TBCNXnXjw0u13uUbpZ/FedMYVRIhJ0tpilKYd\nGakek/NErL1jsPZ/jc7dK15SJmZE777OiV+5q5DeGLobuN0QhmmiaYpbTCKd\n3utT\r\n=LdW8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin works along side html-webpack-plugin to create multiple entry points for aofl-js applications. It uses a single template file and mixes it with static partials, meta tags, title and locale based on annotated routes files. It automa","directories":{},"_nodeVersion":"8.12.0","dependencies":{"md5":"^2.2.1","glob":"^7.1.2","chalk":"^2.4.1","vhost":"^3.0.2","mkdirp":"^0.5.1","express":"^4.16.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","serve-static":"^1.13.2","lodash.assignin":"^4.2.0","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.1.2_1540842526725_0.2214954752807623","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@aofl/templating-plugin","version":"1.2.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c5d6758a383653a606cd7a185d8678ecce1232a2","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.0.tgz","fileCount":10,"integrity":"sha512-kuIm1mSFdLETyEg3N6tIFsaVEuKKLFHebIeLYpMBEcdg7h4NRHUy5/fLc0dWW0/wXrWYVxCo+Iy32vGxtvWChQ==","signatures":[{"sig":"MEUCIQCBSCkBJDKnZPM8s1s4k8XfbbwsoDTCt9i7HiXNo68e0QIge3KVFvRRlnkcnMey9AexcknXy+FYfKUa2eabKVBwNgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4f+wCRA9TVsSAnZWagAAv1MP/ij5PTQErroXYQP+chZK\n0sjhS8R7dvrCD38sPKWLXHszyox8atkoxddrgF0ZzA4hEeZ7DLeO70c3xr3m\nRAAdh7Q/em+4MrFdPankYV0vjZwOlziHthUwbT7aSbe+vPnQOSD3LPA2eUjw\nttaqJ0cKHBTYHfBaxF9wt2HMlAeymfjMmzV9YuhfXUJgHt7U2YfdWKwHdRAr\nuYN2Xq7lG/LNSZDJHkFVVwYMRF/MmDA3uV0Q4NZMA2gzNXkZw+PH854ZIiNN\nSJfbvPeNfoxzilTyqz77FeXvGSDAnJk/f6cMJ/B9JtLmIR89K5X4bGtPMAI9\neiuj7h2MUkP6wk+TvfkIXhulFdwA60M+4QglRPdtaEn/GX4Op80Zvf4lP+Ic\n1076GBQ8XUrFVk7LFwpkE8O5nZjEXhcd2rM3rTfQDWaK3P2Fvu26K5FvS0Oj\nxMSPDhLWse05Eb91MkZpR3sj3A/ipdDesKnz+d+x7hYVgqbOKz+RsyQAmzzs\ng5Y8qFW6jipT7kVjZQshn/pxqinghcGgNTQRlJoBOoYOHxr5yDg+ffZHXrKw\nRL6KU2wuzJCHx0nUCzhebybhNuR2EEJKMSEwnssbb4TelPaKzSvEYBYL1p/A\n2mv7U+IoE2EE1w+wsrx7KGPSvpUHwM5H1RYU0CaEHF62+5XHw1gZCD20trHA\nzANT\r\n=c844\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"8.12.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.0_1541537712153_0.9373452350543168","host":"s3://npm-registry-packages"}},"1.2.1-pre.1":{"name":"@aofl/templating-plugin","version":"1.2.1-pre.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.1-pre.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2146c07c9b5dc7c727f8f06e7aa9f5eab62484cd","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.1-pre.1.tgz","fileCount":10,"integrity":"sha512-meZ2Gdmjmq2/hECF+4Z0RxYze3KsvJaCSDlGXQ626Ya3fJ219U2FE5uANaZlFQjsdD+DtC2lYHgAzg4rQbl8VQ==","signatures":[{"sig":"MEQCICW5LhLf2uQ/jVwI2mY6Kmt9k9Fe1Z4pPFe1jkUmew5FAiBiGmSJ6jU0vnyOzvomuDSMimx/EAT2Dp1tbmA8iCOQTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9ELBCRA9TVsSAnZWagAAfPkP/ioC/NB5QZrqn2D5rP6g\nDuF+KH+PlweKR2ieQMgjI4uv1w0oEKK5tKtXeUL5ISZMC2Kb0sbBqAqHME1O\nsEvZLUbdgiv/TXiH7nW54fQALdjkNO0a8Zb5JCEzjjsXsIoXALLqAu9QheuV\nxBjmNlyQx099tZS5uKibNI786DcoKxK+ZwUfmgo5SjgpXfzUV6LedA9+m4vT\nca0cbpKzGDJH0ZL/oMXz4qjMoeqa7eQFkfuhLWs5U40FRgHBqg0LrSPKvVro\n3HR5zbE94VPL4RbDpSnjJl+ivbsspcPfbfLQzeq/IzesWMoE/29sBnufDf6L\nwlhVkPjukGHCk47856d1DmnNuK3wwkERZ4PcDGFrk1zbmP46cKPGmGnf1yhV\n4r+5uBpFDOI/CBOLcf8H+k4S/bXLv1ZqYIMo4vNuU351ib7UR/yh24vux6dO\nGw6p3jFvSoe11P1D102+JHFketzoFN6X/KDri3bDnX1qxX2FtRrofKfkL1YB\nXfLUAKadERV/jgvEThkhV1zBe90ZcD7x3GdsjZs67AGUQRk3IAAn5B+EbR1a\nY70kvJDheHZrxDRxykMyYn3ZxZmw8NDaKnmccHkKHu9oCaCaZoZt2/QLpz1m\nJ+dvka8mjw6UB6nimetTpllA3biHYIhwlCeVE9XiUrd8AX+QYKyciyr9D7jx\nPJEH\r\n=0nO0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.1-pre.1_1542734528896_0.67615125516549","host":"s3://npm-registry-packages"}},"1.2.1-pre.2":{"name":"@aofl/templating-plugin","version":"1.2.1-pre.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.1-pre.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1126a0f0fea6341eebfc099435fcd0c9ecff13f5","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.1-pre.2.tgz","fileCount":10,"integrity":"sha512-Iym/S1wncc2aFBFYtkxMLWpJMJrmAb/x6hHFI+/2dg0f/W8psjQodGRaYx8bCE1PPoUOTH+452QPf2p7iS6tEg==","signatures":[{"sig":"MEUCIC7NnZenEx/Hiz35jma/O1nd8hXcywMfMxQfoMBclsN3AiEAkauLw0Jnwke40l7Rciq13pJ33v2bGJjiMb/AkjZBer8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9HcuCRA9TVsSAnZWagAAtqAP/1RV7dhw6AdOa+wUNmSS\nFmZUgJtd70OUMp8h/AbMoY00/hg6w9evVFUT0qrrBP81m5GdzruGuJSTFIYL\nHrhtfHE2raorc1A7lp2JJsDC0yJKhELGcksQMVfIhS/9Du3LA6zp5+FH6rbX\nQ9RYKjro4P6fB8+02YtVcoaj50xm2Xgx8+nSrL4gXPkbX57Kl1+NL8jpEx+L\nv2/Qm+dAhqudHcXgh38wEkZoSdvaj2svQuf/TkxAza/KuA74c+rNwvjTIPOH\nM773FFQrhcA+knGKITU2DcXwNtMe9tCTYuz8c0BMbYV30xfY3ks0cbxhWuQP\n7AYpbK4U9XSXWkKKQtgyxKHbp3i62WmQSjW04/8AZumaYsRMfOZV0bT637zW\nAzq1Icj8GWPq6FZjfpoyl60U+xlyQ5FTDmN7qo0KQ0DqT9toYIypAJjxdJOV\nEP4FajbliWryDXbQrppOyRmqnkVbHzwjm7YJKy6w56PEHeR6PROESUxVi/ZO\nEJ+xHb9y5udoUkTVUOdbYepnBmrREH9Bd65eV6PItlGpvbNSTTYUz6EQsSvD\nVe/kVFZFrAi+KbrS8F5TY1/jTSiKSHOpbt+LR8YrOOfHeH9oFHWTZQLK61MV\naIHcEHjMXT6tKnpygu9PoNxwLyVzUNUwY60mGeUJpiCJuCe8aTzvpIbn8S1H\nokvV\r\n=cfPl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.1-pre.2_1542747950153_0.003277978026990036","host":"s3://npm-registry-packages"}},"1.2.1-pre.3":{"name":"@aofl/templating-plugin","version":"1.2.1-pre.3","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.1-pre.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8a5533f5653647dc3efa6a6982a55f504dca2b84","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.1-pre.3.tgz","fileCount":10,"integrity":"sha512-OTNGcv7Vul7Hd2/TeBK9gXIrAOMSe2pATY5yNZrlv58XlFxWAP12f50kgrcsj1j3xaaAhu+cmXbHUgRMxV3/XA==","signatures":[{"sig":"MEQCIHU701GpuYBAuGhz3ylAAzCrgsa+1e6AKeQ7RbQstcd7AiBkK6VcilmRUv0PGdL+2jV6Bi+ALYXfV48VDcN1R37hPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9I7sCRA9TVsSAnZWagAABCoP/14+hJ1vwsNPfYFGxm0y\nUtp7Nq7SVpM5HcJUw8tDT1BNrx2nuYR7VsPhpHr9Q2E2NwC2wpYqNuHaxz6N\n/R4iGSmqD+4pQQnCoi9c92zmTaiogo4ZfmUXMZ//X4MKzA2bukMDgkGqDKSf\n5DM2gXhwRQjKplZ68YhjxfMZCddKWR8MMvGsusOP4FllsA8RCsv32FJTsq1B\nytTI4xuDOn6OS4cSi2vFd9u7F6cGtpfJEB0vSAzPPRkJrL0OrogJwUtNG82z\npMEYgEsE+GmoQo0wD6CplR8Kthg9YEwaJfrSTCmx75/JOgW9P5fZ7ZEMKR72\nfQapLpls8rYOQmXEBLQtnDszB+vGb6E2hYvJRqKfuGBEPqTspxvN0NbfsJ9N\ngZK8AA4ousKB3x2tSisuzFjvROFPLAQvlcmO0DhjSm7Mc4sx7yOyQ6ozgTMi\nKdnWmrsCUn6F7yGe9bTOxPXmEfnuJeoliv6mYRjpAm6qgQ3Ac4KInIhs9lYT\n2PJofEJFAb+5L+2Y1Lj8Od2lk/KT41Edf7bwvsh+vN25ADW9FV79kaprJp5F\nJaB+iZDHlS+9fsqMuhdybNMzRhXbYUnkXWlt1FGwc+I7G7UZw3uHNlJfTmNS\nysfemct1xek4eRAf1X6GiBdQgHNujBjs+tSIzzwtsWSqq7fpoEIHVVmjN98m\nRNsp\r\n=Fy44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default | Description                                                                                                                         |\n|------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template         | Object | {}      | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                            |\n| routes           | Object | {}      | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials         | Object | {}      | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale           | String | en-US   | Default locale for entry points.                                                                                                    |\n| preRenderTimeout | Number | 0       | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.1-pre.3_1542754028275_0.47327458032025427","host":"s3://npm-registry-packages"}},"1.2.1-pre.4":{"name":"@aofl/templating-plugin","version":"1.2.1-pre.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.1-pre.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"04c40c8e906f8b7855d891b37f9a526e919f5829","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.1-pre.4.tgz","fileCount":10,"integrity":"sha512-NnnpRbkw40T0PQYH+6KjjvDuqf+W8a+ndfbVZIH4Os+aNSHWNxtBENheIjEKUXv1imvwEj0V5ZgesS4N3tVbLQ==","signatures":[{"sig":"MEYCIQDeAQKh0HIqWwIalQUWseaNlwOaI8zVgs4DNWJwjekJ2QIhALGiMOPBVMj8ZjZ737JVtemjPA7uW+U/BczVqxBVpZFQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9KAUCRA9TVsSAnZWagAAS6oQAKNS3Vv6W6ujjklndyF1\nVTOQzm7Lwzaa+w+YsZSm5NsjEmA7ZN1SF34WjSo1z0+jUjtCSDP1pN9BloPY\n1RgHhMvkRoTq3XgAX/VPXBWn955kTNRLlWMSeu/eTuDFRDHq+SCLq5XrNrpJ\nTb5BCIAnYEuLvnS1S8/SzmrdWebtm1O71sWoaLAioeNhFeDiziZMYo7r2QRB\ntFx1aVqh+/4hwRUez7QVogs2piEpf08t5nCA0LrsAR39NReekuptuw29FBjT\nJSqctbNrdHKAxp8Dsh5OHfNkgKb75kiGA8xAGPji6zpP27zcaV7GsPUgeFIl\nwJ2jpwpb6u9FShqqaLRekMK/ipqWaKKaNHbhT1hRxEPVmpvSLxf4pPj96SoT\niEggwZ1vSvFs4RBZAZJ7j0zMTUBx92aB/KPAUqT33+zDOYDEiWodQcDFRiYm\n6ZoXxmMrEh4j9ZOW9MBUnay3sltTY1aKKMllYaYamT3om9CvcJlHFEf60msP\n7ne590yrm3HkM3r3wmSLmubpQ7E2qJuuCAb9YOIEJlGBXFS5qJjWznY27pzH\nbnNxhxLp3Hqelu9YQJfuqtX0XuNJm7p24JKPooXhMYLnAXDI5aceW6EzW7F2\n+J6Wi8EO/xA9ggMPdt8q37XCVS0blBy/x08y06EBFM/wJc5X/bfYmsAyQWET\n1XQX\r\n=igUU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default | Description                                                                                                                         |\n|------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template         | Object | {}      | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                            |\n| routes           | Object | {}      | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials         | Object | {}      | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale           | String | en-US   | Default locale for entry points.                                                                                                    |\n| preRenderTimeout | Number | 0       | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.1-pre.4_1542758419362_0.002683403761162495","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@aofl/templating-plugin","version":"1.2.3","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.2.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"65bb6c69c8c98eb5e1ac33b0aed3f8141961546a","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.2.3.tgz","fileCount":10,"integrity":"sha512-GFBGuJQwcIYPyCuy67IqKLkUfdO2budQwU1RXGYPesjv6N+WJ098BsG1nChQPSDSzDcB9SwKlQKZ9Q5ru17oBw==","signatures":[{"sig":"MEQCIBt7DTngWcFb1WQRcVIgQkK/d8vk+OxYFvLw4f2kkaUdAiAzjpWhD6akjVEM/7QpoAY7foA2Dku92b8Xw2qQyqHlgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9KTFCRA9TVsSAnZWagAAqhkQAIVhIclVaEtBRoHboSBK\njHuzlcj8olPIEFucN28y0vsokSxQRoS0iOiAtPDoDRRL3F/8aNtEBY7svflU\n9iXV7uAKB5mpu1hw061vmFzvy2yT4V4PvM+FNp0AawEOQJy6klEif51uAov4\neaOkJ5z6naPUn6Fe9y8PuCP0Kq+0EZA9h5jdngDfK9cKVKdBnwxTx+XcD8xC\nu/dGJ6SS0LdvoJULqJBA/WQLGsONtQBU1Wyd+bwC9GvOL5kIlGXXyZ3bvgkb\n2d1Fdf6lmL5k/0ypgLKV5LQMNiNdsTQ8TKmNmGJV2TAKKkvUr00ldTnLVMiJ\nK0445qhUj/vb6p4wGZU6o8865WfW8FXCT5wjbHalYzIEBVPZ3qKs1sJ9A+BB\nc6PCk4EqkyiM/2uH0zPKyoq3DtCvvwbiGtFqnQxWVUaYtu0nonXHZ3CiMTrN\n254IV+jfSlP3M/lbFsqCRd19p4wQjCEGnBpFkGf7FuA4KHDeuWcXbWeIeU7s\nXIeUraRZ3hMpfD8n9WTrjkLIUM/m+I08dGswhmn2tNNW6ndH4bkEIG8jEj6J\nopzBIeMMw9azg1Ckv1QcdFLwkegvho7k2XIOlzxEFMDI7G4PotkbOoma8yWK\nEJc2I9tQbHmeLMEY1GqoHuBlEHzNuzNjtwxE48I5xXfzQzKVi5UvqOhA0VW3\n45D6\r\n=0Xq3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.2.3_1542759620479_0.6313584546962514","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@aofl/templating-plugin","version":"1.3.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.3.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"184de06d539277fc27b90a6312cd27cdf93da0de","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.3.0.tgz","fileCount":10,"integrity":"sha512-oa4CZl1VpTEtXYO5FTbqTJGXic+qnm2ONF+b+qRtAO2LxoA6K5KCjF7BxGPO7Ynlw5xmxyzOh02GfbiyyH757A==","signatures":[{"sig":"MEQCIAZjaGghn2VwUzwHQ2V0/cGS8VSYxD3VqZ0zCRl0EXWZAiBH/nfTVo4OCWeN9tuiejomohKCraNdrCMHQkArSRXoqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCYwYCRA9TVsSAnZWagAA++wQAIrs5L1r7hYVs0OPs/YV\ndL4Dbfh+o4p5DVjelCBzNngfeyZBJ1SOL05bLQhWkXvd03RsYWGkEBtf3trb\ne5bZHwLEtUO1fnHNhdJqBS50u4VC4de3iiQHVx00jfQrNGpJiXEGe0xLU4JD\nidFjqdlq6AAPlHgVZ5vCjeeFHM0/PC6AKQCgINu6xhwuAKJL0b/gFK0COVQo\n9GBK53rAisyMG0D3XcCVxWY+Uk4zd/g/DeuJXxAO4hKLLPxxQgAcHCf2ZUVG\n3MduzoZLoxWTsIYwI4Z4x1n8LWtmFE/8ZYea6/wuf5O1ZfxVnNeuuAjgcK/W\nmYeTKf2CyqkYtWLejxlzNlgqlRRvArtllH107fUWtD8G+GYBDyNjT7wZDf6E\n/WupO088Eb21PNrFCNLQJAM0N2ROg4cXiJob88kP/x1MmTxotlhYgMQw6ODZ\n4EGuLhtAXnNGAzyrGUCSb2HrWAVWc/1Xm/S6jfctsxRZ1RlNWBVo44aCAAa4\nXS5f7EOkadm7eauJVn5rJOunnEJ+8KcW7xr/Y4SmNNZwhBcv5KN1kcqM88Ec\nlThbyiIhTZ/1RyOY//R701T9pIqmzetjSyMnTr+j24hcMIA6AxZbU4TgkMMW\nDMlUGtz6TunNr8QC0d8lZuyOKcsrVNGHEMLyoCIQKYMOe92UwLuFIp8o3PJt\nSpqC\r\n=b8Hn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"^4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.3.0_1544129559735_0.3916594158885034","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@aofl/templating-plugin","version":"1.4.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@1.4.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"92f22567225a9fa017a09318ca433db3ecf25aaf","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.4.0.tgz","fileCount":10,"integrity":"sha512-4SCxGt4gZbp9HQw6DgmA/jmlcvtBE/nxHsyG0uiXRL9Z2Na9IZfTFYdCWN8Oyr1+OottQ8mvl7KnlP9wQMkvwg==","signatures":[{"sig":"MEQCIF/62UWKpLJK1DJQ/O3oa8pFqYhE+hMFALOiTjYXty1YAiBsRGiLVnVuzImVkyAr2duyOIBJZd/TpywcxkVUnhu/8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJYuTCRA9TVsSAnZWagAA4+EQAJBuWeqHDdoQjfY+eF1q\n4ynr/JoC+/WKL1VzBf8aJC724D/lRW3MzBbkEpcK5t7OPhZp770xmNS5jWMJ\n/vEuoAOkrmHx1yvMNTw2go3b5v1yei87ECh++x+Dst+aPQvnAnqRyd6Vejez\nReuPhujzcuQWcHnhEil4MkoKNt1Vr2dqqKcVmt92q8hpk+cJ2l8qG3fr5+D9\nNsBtvYfkO6nwMCY/eFexY6vgdzk5t8nc/9tVym0NgifyNxQL8Xb5qc6TOEqg\n5YMsDcDRI7aj/iCY2z0ig/Rt7Cwr0jbbnsbYVqa9MKaFx9Br2Fom6AxQlGVj\ndtO//IeZsym23TRedZITWdNUa2ZdRXESSzoeu0H3oWq0AyVtdI76hRdwxEVC\n8QGwRkqVoSc1QEzczEVC0zbCZrcDszLAHIAOB3gnlPjSjOZKSMi7rlXv8Elp\nOrt4CDVWecLVQoXbGDydNhHzaqTHACvLK9QeTx9ca9oZtyFcfG84GZwOqIjb\n3dU1DgcE2w4JIRIsoLByUlA0bAjJfM5pCziXlHFXosaVFp0odboTZXo4S5W7\nWAz+mXzVi2DCi70O+PBFfpJY748XZwknMhl8yn1a57Qw5zhAlabk23crBPGL\n9rhJcTq040gqPgZnFuIi3UC6ICX3pS1WAn7+rftgdAKz/FXKkDVdzi1ppcWm\nYuyp\r\n=byE+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.4.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.4.0_1545964434428_0.4038307719678895","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@aofl/templating-plugin","version":"1.4.1","author":"Arian Khosravi <arian.khosravi@aofl.com>","license":"MIT","_id":"@aofl/templating-plugin@1.4.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"907e577a3fb58ceb94a9ddac93bc9e1da8e53c0e","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.4.1.tgz","fileCount":11,"integrity":"sha512-MhSjuxkvU6VQ0uEXaC3XbKjQJXygKHE443uJsF7pyTWHOgMi7dnmZ8at/enjg1ZXGiHDHWJNYKQf4vokDx6Y8A==","signatures":[{"sig":"MEYCIQCSFfpRJQ8lCbj8sLd7n05Xy5it4JTkQrRsvVvjqbVt6AIhAPDn3rKFTfYNchTUIGlLfrwNy6gW70FK0VAimNpolqM3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcM5tyCRA9TVsSAnZWagAAc2YP/RX4d415pDWd6xtcnvjy\nRVtw2ubeX8Ta3EGtxq+ML677kyWHLkdJTgQhixmDOp/tNvKmOZsgkI8i4aZJ\narf2DdjTlNSekBW6WftJY8aJn+RsO8X6hdx9Inn1FaCrHQKRgdpKBc1mf8Vf\njthMe8wNapmdMLap9eFzcoeaI5fj5z6KpV55t6W/j58wVktMG08X5+8aPwen\nWA1YF4U7AXDXMbcJJTevavujc1E9k/U6xkJG5Q7G32lwRp6KXshsJXlnigW7\n3q/y/jrjuThSmDiUcLA4XpQBov9PNvTeRAgWmhKgCkQY0hqaSK2OnuPDfSt0\n8QctuYL4JS7RYB1pQ97MhnLF7Ltfb06a63qSbHNFodMlzgxZa1bovD51hKJh\naOHpGHFk5R5jaSvyhUmWQ0pIT+tyb/0P17bnvSIds/pi685UmTpAMkClsEML\n/SBzppHQTGl5EBBX3KQoIFJKyuY/nNNOenmO0gTRZkKtfow/mg0ihnw7U/Vd\nT9v/SEMyv7F/+5xvrpukujW4mfjPPKc+/N/FPiqF0c2C5LTQUx9j0GQ36R/+\n929sSqWlXTRAbshrS0417ELdM6mmegElKrOOZzi/ZA/wAmFf3jD+uw3GvCu4\n1N9aRVncR1AASAWbVBiDKda/VqaCCELd9/aDozA+iJhkV+pUmDJZprntGhDX\nZw+s\r\n=Lz8V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"60297b316858cd061ea1c221a7e04406b910ef38","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@github.com:AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.8.0/node@v10.13.0+x64 (darwin)","description":"","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.4.1_1546886001506_0.3065579837319965","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@aofl/templating-plugin","version":"1.4.2","author":"Arian Khosravi <arian.khosravi@aofl.com>","license":"MIT","_id":"@aofl/templating-plugin@1.4.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"dist":{"shasum":"a4a4030e3d2a511f79f90eb220894fa3f6603cf9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-1.4.2.tgz","fileCount":11,"integrity":"sha512-x7/4FGrGOuKIDt+BQE9PJElc5PUXn6KidrB3nGoqcai943MjwsfNTTC+i8stPpk3pQWrLFXfNK1B7pMPmkWacw==","signatures":[{"sig":"MEYCIQCMmaEimhTvqxnZTdGcgpHdeo0RlJoc5vFNBx3eO5z6ZAIhANmFuPjvVzthQWlJUAQK9IepVct7iZGBzoyXBd5sXr2n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNSgXCRA9TVsSAnZWagAAYEYP/RpiC+k1QRU5NkIg6wzn\n5j8pfsgs8ob65ovnKwM0rfZAwWApZwzFC7eyUkrzcU8L7Z4q+1UDQmVWiDNW\nJUUmpvWKdl84QMzXgQYyF0UaBx5TteJp0ZE9eXQciaQlu9YT/0QxN57xewqz\n4jhbd19yV+LTC9Lky3IO2hh569BDPqZcfc9HicwxG6J/fs3sjU8WMW3U12KL\nQwDIxc6mjI+xvity0/VAfL9JEmBzB3p82nEkUg5TOl0AvxumXgXde17E8hHr\nOe279CYhvO5blXiARM/13ldbFjcq8UM6CP9GJ1JkbfWfXXIgZCOZeiHm1b8t\n8qApmpP9S4cp+VWGyaIIlxkK/8TOK9SXYIapRPrMsw8/A0t4tSlH1bu9plPC\n0t//FGFhWnAzo+3Hp8sikuKrpAh2jtPFIWhm9qYbe4FC4AwUcHTSukGXua1o\n9hFYaxtyERIe0tzphbFmNEW2dXLuhj4532OsNTrfntFpyVfy246/OfL0noWY\nFlfWHnQQfwnrpb1svFoRQWbkHb90Yq6eKjQEwwsJYwnkc4ZA00ufApiPC0OW\n80g9h+LPblSNlu6yf5utJX/ZBhTl4OTxq5tdMgUvr6bGdTPV4PPm20YRnFVu\naqBgKelFgzSJQ0/OWpBmuNZhiuhC6vMT4BBMIbNl+DwH6QfAjmUlqmIoraDi\n+oyl\r\n=ZiwZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"8e8bfff4f067d163aa8e5784aedb8e3d320956e4","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git@github.com:AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.8.0/node@v10.13.0+x64 (darwin)","description":"","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_1.4.2_1546987543320_0.2638148666508915","host":"s3://npm-registry-packages"}},"2.0.0-alpha.0":{"name":"@aofl/templating-plugin","version":"2.0.0-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"26e25045aff63b3eb2bdd5b700e414c9338b32aa","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-M4+972seMw9a2AxW9PtZqZ9tgx7zEr9F6X8C9uz/RbmopYyQCu9z6JcWNsx9qnqwytST8cDttKbbD/Sb176xaw==","signatures":[{"sig":"MEYCIQDgBpo9eNTj0Mr80lA/RV51IbjntG3rvtjDYScdGNfPyQIhAONrwEqm/E2g4R14S0pujbtaff/F1e3H+gf/1TdTTYLR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcT5pICRA9TVsSAnZWagAAUg0P/RK+rQ+0pXvie3gTj3f6\nG2BMrXzBlqMYxkb6PbJkZcKlmL+2pTMQrkrxp52Bctp+OO6rqIL39MPOzgty\nXgqjw+DgNvhROqA+Nkj98ZrUDKLZCykYnpBX7oSZIvoRAjBP+guMdduVnF7+\nAk2MSR20VE7HvtiSEoTHhD1C61lKBEy3TSfHCF3NqvnG5gFt5wxcgU7d/x3q\nMc8dHOm/ipr5X4iEoKJhQaE3fs7D49weTZ0Fy7D/6bb1Vrz0FtMe8s5Ti6gh\noPtNnZOYtowSm+IJMJKdXabeX2IxtdpvN8vc1a2vXz3rRsdNHzOkqcoU3INk\n+xngT6BcmdxC3aJbVF+IsoWFJsQut0DvxvcjmwT8veb6tt/dNKgR3OjJiQHw\nWsGbvJOUUGa7qza+H5y7coNGAI1XOPiazRBrR+xb6Cx6VqFSeKkODLx3maCw\nwfXDCQ9gF5Hiqj71wIvXJIt8m2ub5T1cI2TspRU3iKVm26zLcp5tFfa8QqGA\n2BOb6SbvtdRgFcNnDmzypFi6gUGlqkqUpuG4K78Wuj0VkynQ3KIpP5idEWaW\nCxS2lOplSpueMmS5Y0xmQuy9SE3hiPdF9SEzgaNpTjpqtlE6DuYFP4o5+xB0\nho8xMXhNfVDD6l3srgRKOBCtSBfwLSHltQFhhCclESvjo1FQbD3xCIX6Fw6x\nNbnH\r\n=59K8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default | Description                                                                                                                         |\n|------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template         | Object | {}      | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                            |\n| routes           | Object | {}      | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials         | Object | {}      | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale           | String | en-US   | Default locale for entry points.                                                                                                    |\n| preRenderTimeout | Number | 0       | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"fd70fae5cc015afd992f08fc0258a137a7be9f78","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.1/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0-alpha.0_1548720712398_0.5117477173847211","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@aofl/templating-plugin","version":"2.0.0-alpha.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0-alpha.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"},{"name":"bill.salak","email":"bill.salak@aofl.com"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2263bac28be2c359420d4568ab4247b7b9bbf6cb","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0-alpha.1.tgz","fileCount":13,"integrity":"sha512-9WsRcZ4kiZAXePZFWgkjpJH0IG5cqn/Bzt1bZslxm4ICdxwqoMUFPwUTKho3/zk7VTE+5cQdpeTLAvbvyvNmzA==","signatures":[{"sig":"MEQCIHttWJcXUw/abTQgWf6D2rRFJyJixTcsZ3EP0eI88XU2AiBcjv6tUt0qhxcY0gRpGA1QdlBQKTQaBeLHWYOpFr4gew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcT7IzCRA9TVsSAnZWagAAEKkP/RLPRuIr8rVx4XZ1Mro7\nlPPq1BfGCr/wAopX7JKXhIpp/avkCEIxinx99TmFmPzbgf3j0dcZ/kU0ftK6\nhkEAeUig3whuCIptpVEEXqJ8VKKzcqxfpdoLQdgiRFN99lKkQg9SH0AEOoJs\nKcSxuGLxZiXUdjfg2/b/aNStqkcViqlma4s9a5wwwIEj2tSWN3oeN7G94oLa\nOwQiQzPJg2cPL1bCVt5L7wjnJ6rGA8/1KhyvvsuVbbxlMy0y5Dim1yXjzMV5\n04NqlLUmWkPfpqvYv5PxRl9vWVJ6qfTeSKf8QF9lAA43X7ltZeb5hE+hheb+\n6bN2acNVSJLfY2q7Dpz3cJF+dZrsbeIOh8wqetdEMN1JlF0JtvgAV/65XKrN\nwR1VK3sXIKJzOM/9dXg3/z1+80G56plHQxhQXZzMWV1OTa3oc64En4yIDJho\nXBvxlvb/tAmCORDYD4KrmcCzhpIn/9HMaF6S9ULZTaAasYY1aFmLMhltjwpu\nrNVObCZ9wenjN4M+MzUaBMgmJh83y3etZLfk/jYLs42figGu65y9aw6iMJNG\nQtkk0NIxA8OWdTqMAbTeHehlL8u7yPe1N+xYCDVUw5h6Ic4tQ2RQqpZ84x8a\njut1GQWQLo2wSXtW4SfiyfPEcY/a8T/Wsk3dAVj9J3lb3b6qAovjEB4/vbXR\nKycw\r\n=FoyM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default | Description                                                                                                                         |\n|------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template         | Object | {}      | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                            |\n| routes           | Object | {}      | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials         | Object | {}      | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale           | String | en-US   | Default locale for entry points.                                                                                                    |\n| preRenderTimeout | Number | 0       | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"afeca11d48651d7710e6942de5fdad812d9d87f9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.1/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0-alpha.1_1548726835397_0.5019918285490483","host":"s3://npm-registry-packages"}},"2.0.0-alpha.5":{"name":"@aofl/templating-plugin","version":"2.0.0-alpha.5","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0-alpha.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"94b67c997ac540bf7d585dda5986d2aab4233237","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0-alpha.5.tgz","fileCount":13,"integrity":"sha512-zHZUvz3gGFCJ2tYRToPsLoWBKlHsSvU9PJSDz0x/KjbeC4z3KUzglIUOLWnHFGGTGcMpK/sE8ZhKQIuS1bTphw==","signatures":[{"sig":"MEYCIQCThPrw336SMvy7kdOcSmZJWsppZwyKkP0kS1MKvUCGnAIhANRrYvDh3kGiUEQAU6uR4qhwUZzZFLFG5sq0n5jjTQOS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdciOCRA9TVsSAnZWagAAThkP/082Woh4+UcL/J+hQYci\nmAPfL2M9T2Jq57/XXL+oFOHgyvg9FPQYl93ojuaBC+r/rxrV9KIrGOQsqk2n\n00rFBeBXrUZBhZ+YY9q9DELh6VsoQOZ3N6XlF0hUNQDTiUJqsqZtEBKLmUac\n++OBmEtyVhbbADLBPz0qh7ZLQVAeAQIoxJtPJG3eJIXEcmBZJ//T39JbHv87\nDdJh3VGuQkgbKNQPfSpnF2a8eLAEOCg6xHNCG6bZpZLf71hfXgKJ/CM60iNl\nuQGpr4gLpW5LtUnTR0iG2/VgbZ9LvKJ0wmYgyXekUnn7CgbhVAzLofzFRNv3\nCp8VQtvA8k9LneaC0vpTBsVFuA/Vn/eNJskYUrOo5WHPlD4HGfylYql2ayuy\nl2M8JkvN0sCqq64eXIYz+anNO2GWVHaeIDyQUlxCtegwHXRVCqdM9XRuyiYc\npH40DUgaNfV4DQ3hNxwkNnzAHBDwQo1cx4nFQhjrAvQEVGh1OLnW6WcSg0Tc\nux+P4myUdtf0gswPxPMvb+/63UvxGpXaZxBiS33AKWJRvlGJNYmSGQn92uhF\nIrRWB0gvB+wB6dcAfMw/ulmPypfQ5mYif2QASs5ZvxEEcXAf8Q6GE7lrFKPZ\nAYp9lmbzUkRD2U9eV9Z1RE9xekIjn+iNqY/nfYS64MHuHm4JVBSntLkEAC0L\nMoOT\r\n=ZoQv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name             | Type   | Default | Description                                                                                                                         |\n|------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template         | Object | {}      | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                            |\n| routes           | Object | {}      | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials         | Object | {}      | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale           | String | en-US   | Default locale for entry points.                                                                                                    |\n| preRenderTimeout | Number | 0       | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"00d91514e0c953e8cd998150ed5705b87db20b39","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0-alpha.5_1551222926142_0.7920663987585528","host":"s3://npm-registry-packages"}},"2.0.0-alpha.12":{"name":"@aofl/templating-plugin","version":"2.0.0-alpha.12","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0-alpha.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"aa7444d220e6fdec8ddcb1f70dc6d5fb5e927b57","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0-alpha.12.tgz","fileCount":13,"integrity":"sha512-s3+hV4A+HF960u4t/KZHuhlj0bey/7l6zwaptB8yVItfxTQZZufrFuY5QNDdc51PCZvqyadu5qwAphycBT5sAw==","signatures":[{"sig":"MEUCICc++0V2r/m6EbTM/g8hIESbsgLwJVCn6z1QYcfJXMppAiEAwYqI6o1Orm1vGgKYRs3KV82zH9pqKw8UPbev4rdV7Vw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnAifCRA9TVsSAnZWagAAyrAP/23S9REnN4CWoHfr9iWr\ntiANa+gIXFYbB+S+xfgSb+1BttSytflUv6yNnkfYfTiaRrbzoNZIkBoVDPy8\n66RqBiYkHAznFpkYjF0zwm5niaSBIMxWmo/Yr2kzDdIGdte5+flcB4y24Nck\nbLjaQH6+jAEOe6zhot3G2lD2afG1AfXpHn1gjYrcN/Pnl7Si76pHrDVKl/6B\nZqo4AVAeM4Ed/be1Ihjnd+sjsHy65NItkFJTRSZdK85JnLE8t+N/xcDhU7mF\ntlRYwOkGiwXAO1BiW9z10nYJQL61VRp4FpmctMvm5ewdxxhSlav4knfDc5u0\n/EidzT7sIDdqcFyCs2Il7zRoUFeFxsIk9XTdGa7lMZ5VHDGC7H3uFE9aqSTV\nsS0VsDu412I3ZfCZpXFgtXG5FhL3m5pEvd/39jxeVWDVbeRllhSASwTsWe9Q\nFfv5jbRzZLcYJ+EMA8bVs+L5nnGYh3eQJdU3SutffAqLO6nehjsTMuYuARXw\nzZSN9OAQfDw8km5gEa9aPz+c7HUcu4TtaJaWCuk+xZMJhkKwd3LCPJAaPvXT\nBdP4mXNsAGmEttfDPhFX4B4augeTN6Fik+cvCFRle7Vm+M9vhN2XJDfqfxNW\nLv/+G7oPVBSXP621F7N9ylPHmBvdFn4xY5mKZMYUsTMhUalD5UueqoJtl/tK\nYXSF\r\n=8uYW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"c29fdf33a6d40be236b4fa37fb5ccda38a92bc65","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0-alpha.12_1553729694857_0.40661500164693165","host":"s3://npm-registry-packages"}},"2.0.0-alpha.13":{"name":"@aofl/templating-plugin","version":"2.0.0-alpha.13","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0-alpha.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"71c7088e450ff0d7b6031ed96a70d7f92d59482b","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0-alpha.13.tgz","fileCount":13,"integrity":"sha512-UslqwhgEu+b3Q8fZBKdg+Hd28gKtRG4es7Fc58jzNLExxbJ1C2BiHbfOqxptbTafIOsjP7ZJ4nqGEuEYQqzyAg==","signatures":[{"sig":"MEQCICDh/hzsNCLFPweIRbCfx7gDEFJar17LNTr096PFL9I/AiAZlln2amBoyzHEaQkexMWWQYoguzo4SzagkKvvvu5TsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnBArCRA9TVsSAnZWagAAbk4P/0QJ9CIi/zqpWLQyMrES\naDy2wStxF5Q4b4ZcSkBWncGZhflYR5x3o8gAEal89gcibl5xxkjMTgPHIo3Y\nr/oGLmUOcSobps8Swoy+52kOcQ0KSc/89dVaJx68WhfBiK86FFTKNisVZuuT\nniqvrn0D3hvApIb3oDdR71gYBbDjU8wK1POdcEgoO1dRlpft47vjyq/aOJev\nCCe4asD8kGRKk4hwZ6HCITyppIZgZV8ttg35UbG0Y9d7ZpFE5AtIU0B8TMJL\nc3FlKw5VKUyLu94q4UYyHCiZQVA+L3+69Jr7hWZVuFJul8ciVkyu6tswU26O\nP8vx0L1kZ++u2O/6yccp8ovv4sCsMPnMjV//3iiu8GOwWZ4Una70u2USXHRe\nfk5PmbBmwOW+uUpRyNCP5gU+CbFn9GnhX7nwDs5p1lWranp/PRlJlDJGoCNE\nFyK6P3re+WppqN1sSW/nFNnLwNy61fgUQYCy7Z/4THNa+qzzHVUdGyGFssCb\nw2ZugznYqoUtEzRNeqJiQSXw5awE6NXBAmL5rOp8h6et9kYgfX9NuBACDBF8\n/i3ahhz/tH/ZeyeGPoEMODZ/kZuv8Cf0f0j1LeWFiFCGGvJch/saN24x+GEy\nxQFZYqvLTwEGkSmE9/UPcIVYY/sm3IP2VDbaNgknGPgEI3lAgTnst/oixjPI\nOj1K\r\n=XmyF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"c74477303e759f947b31d65a74d1a204005b26e8","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0-alpha.13_1553731626927_0.2876560350488593","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@aofl/templating-plugin","version":"2.0.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d5960c82cc5b71d808a580d6a320eae66383ea80","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.0.tgz","fileCount":13,"integrity":"sha512-Ji7zLOxto6oIfYsjduToB9b27y3OB2F5dcdmLPWfmsjo3T2xUsRcV/HKonYwZ7nzPZiQ3X/ZXf4GnnmGD2wAxw==","signatures":[{"sig":"MEQCIHcGQs10nxjdfFuOD3ReLW7unnwNYh98c0GCpRKt+UbdAiBwRQbVR9LCUp7ag9DSQ5eK+gcLMl5cFYnwga430oFZcA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyKKnCRA9TVsSAnZWagAAhTsQAJHlPh21654WRcd1clt3\nDovTSl+SPnYJiwQ1IaGIO5WkEqUKYPd+ZCSSFQcUwbJ2RLZiImrPWHvKH7F+\nDtrWk2JCYsywf5rKoFWOYzkwvvZR5pC/OcDiVowQTSa5wkFg54mRMdXD1Whk\niGsTa9gyyRtHVCvXkEDfnq4Fwwbtbt6pbdGYZjgyq6qZzDfls+T5uGJvQpcv\nwdVe8bJcFXmlgEELBIPNCiwHripQ5L/yPBukoSnFta74ALWzLRAUD8THfI32\nZOkGAPPp2PcFmY3PeKckT7UGaf0gOJCD7Jq0sTYRB/kbXu7CXhQU7kxSdiAt\nV5DAOZWbvEJa3AW/npnH6cssU1rK2JqlRZKsAn2G0MFiN1E+ftz3FgQe+trP\nizSGO0PXogsW1+4Dlm3EzJtB5rdl2v8mvUyvJ5xeZ91+DD0C9jyWVlmvuIHF\nwSQnM0J23O4gHStWWRAdm3raCfxG92GL1f3IkmC0QLQJUBG+llFwlYMvW/PU\nJ+DbljwdCaVmMMcMxVaUNgPJH8gjCepeZCjCJ4GGVvq5V7J4uqYIXsroFLx1\nXmThq+nC4NnAHWrK9Qfa/r1/5NBVCCObdGcHPFtIgnyeRyPhf0tw8ce44vV+\nf/VOtrMI2hmpd5u4nG+/+hwOqJNrk7nKM7Eas07i14t+VEfXCP6ZgUsfHQBK\nZQ5r\r\n=hWa3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"91b9b3074f7031a51ce7afa9b542ff5dcfd64997","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.6.1","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.0_1556652710645_0.19185506223978055","host":"s3://npm-registry-packages"}},"2.0.4-alpha.0":{"name":"@aofl/templating-plugin","version":"2.0.4-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.4-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9b4965ce74e910450322b09ee57ee38e7a4cee9f","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.4-alpha.0.tgz","fileCount":13,"integrity":"sha512-dZgsMOuBU8GkQrxQwSbFMkhOcODN5X2D2XJZbl/nQs7mA5XL+0UEgFNa/l4NxpbSNWZQzHTOU7pD/W01YxmRqQ==","signatures":[{"sig":"MEYCIQDDdMzyYrgMEq7f6brCP8r680csEUqvee0Rha0F4KlTWgIhAP+zIwdApUz1Hnc5uUil9ajwUGBnuPGpHIJU7zimeDJe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCYOcCRA9TVsSAnZWagAAyn8P/2yHuBxx4ZPj4+cuvEKW\nNqwcYIVe9Q3bT0SOlID7TsroSlhUn08PYKFrnVMfnhX8dCxcp4xs8PSP2IL/\ns7AHH5wAxdNYePIFyVaA4/Qdi35WtWYB+UjuWlDNLjLX+BCH4YBxsgj8kn5M\n8eXyL3NgIkO6Cfjf0NW6YMKmJeG7RsYlGZWHY6OYZ1Xsb56/QHgEQHVwLz4D\nG3tv+NI3weeid6mqmoPSqZYLjiz+NkF6b0dFL4Ftgact3VWlecRnxZtxWc9p\n3ndRqOqILGP/U+WRBsDMf2PZDmFtl7s1iEqsczTj4jc49TCg5DNictK/jx53\n0eflrqDrgj71JYS2JK8ENebv6/UmbOGzevtJ/YX2da86fJThKZWQ/TKxR0Ek\ngZjfPywAtp7UGYRxiIY4B/sor5h4Fl5zJII4b7AvpwTFcWJt6hl//WgjpvY7\n6+vkENVrnWpJRcSQ5OEPOnbjO/AYK3ghsOceghDD2pQCugS46kACxzOKyPFl\n5VWJ+Q1Tugu6VosFGnPY3bNUjY8CdjWdfsnyY+rkAEr3LzBvEDlMZLttm9Ev\nU4Z7dCtv3GAWWYuQ9zpNOL6XPHiHQmjLv8Sp7zlYKGtcfk9z3cvlMNkU0act\n57A60NFqHyadUmyAzH0OGV4N2PbHPDqcF0WoHNJtdbp4UGQxNLQD5197gwcr\nkcdk\r\n=ehQJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"958e2e08a59a4cbc5c6944d5359eddfbc537bf59","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.17.0","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.4-alpha.0_1560904603880_0.3229019027218647","host":"s3://npm-registry-packages"}},"2.0.4-alpha.1":{"name":"@aofl/templating-plugin","version":"2.0.4-alpha.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.4-alpha.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"17538cd83519077015ce562adb4ccf525f1a38f9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.4-alpha.1.tgz","fileCount":13,"integrity":"sha512-XkLxJWSSAzz1leSp5f3oUYK6MoN35ZarTnNeVgPIcjgxZII/ERQHgBHmiRqAkeW0QnnjodrZdI1CE4moQa1ogg==","signatures":[{"sig":"MEUCIB6V6+ffEKYUGmUOJJqdGGgvxuK+h312+iwFIGX7SghFAiEAmswCKdeigY/N2o7ufFNQHou8CqWj8UI+oiH89O3xx28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCo9uCRA9TVsSAnZWagAAGAkP/R6k6J7TTmUtrBeWqMrv\nFuxl5Mqz9aJhwUdT8xNcc6VmWvyh0gMPAVfE/z4cOmaUMBsOvMyJ1QLOlZ1f\n58e5PAdeQT5GM5UK/jILB4xscn5kBmDm4mrhGJkWUgJSwsXL8rfibmYlcPFf\nMJIAjnxYGbmjAQckkbyHlSpzCYHX9NROzCjXVp3slaOr3JiGZ91ckNJ9RuzH\nsIznCjrBbkGnkvE3w0W80TzSIcP3hX0OFK+tO3V3JGbEDz6sRtQxkNiTDExp\nNFSUblF48ahe86RF7CZMeXoA0tttg4HfyXaqDx5ovsSdA9UlchehsIePvUql\ngsxq/hs9lX1F3z5VB0rQHMfE4hAq00IAt9qEfHr6UqfFAfmpq6S4nN+nojNc\nuZYKmRHUC/jGc/h6cIudyKq89EASB097rcRni7cGCCI5SZQOF5wehl34F/Hb\n+OdLvRZAo+Vl2I063ekjLb78jVfFtBoqMB3LzzfClr7Wg4hYVcRwQ42hUhAs\nTy+ngKgNbX9ZPjOLT4EpQL+mxIJZ50F1+nowwvMWSJuhDNeql9DWC6u31AKI\njqb/7EkToI+q4G/bqCzSz9jF5qCPLGRi5cJGe75Q8hxIVDAWPikXtq06eod1\nE+TnY2T5gWC5svoGkIj0/pifKEj3ttVgHlDIkYHDi2TxQsj57sl6f+qPZv5Y\nsnHi\r\n=058O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"2ee1d202b4ce20ed4fbbd22abb8565ee83b19461","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.17.0","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.4-alpha.1_1560973165080_0.2923603198855611","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@aofl/templating-plugin","version":"2.0.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.0.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9b1e7f964f0c0223b486a72a2d627fb53632ec90","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.0.4.tgz","fileCount":13,"integrity":"sha512-tbcpzC9pVtVYP6rT2s5mKAMTVkO4cRyyJgAnFiA8W3RXSteK9GsHx4R4BCTVcSgHwvZS298Q4LvCNeIebXe04Q==","signatures":[{"sig":"MEUCIQCTcTSzXl8z96LTWP5oogUKJAxZ9Um8Ebt6aYj4VRd/bAIgHlljyd6VLUgqtkDLIQ40M758xepJPESDS6ytPg0yw1A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCpd9CRA9TVsSAnZWagAAM9MP/imHOxS71ksnTKmxQkA0\nCq+j8BN+XhK0jLjFAo6NMNy2GhQaxPGazCK8CoSLWMxc99xmc6/a7xYMsJaY\nRtuPAFH6wB8ewbNkxLn9xf4fgE9FMLZEXgYb2ZEX4tm8rLaWEV+vG/eucIg6\nYGNXE7FbAze+GKJ7P/eKkPfaRIwcq8/hDGYOKd1QM/zgLk5RJK/xDkTEUyQ9\n/uQu2p2aX3jqE5iTlGb9G+nQtxZucrI4Z2c6k6aapEddpKxXfvCFY8StGSfL\n4PNsFXExhMNasW21UGz7UMEAyE+CrAM19iuNGqZ+/uXx4LzeQ1EMHNjy4xPs\ny3SYBrAEZ/FBijDLQgjhRFY5mGemo2Y7z/vyi0b7k8A8GES7OBMm3fXXItlv\nV16FKutbBH7BNx37yIypmLBXOB39YClhDdcl7f8Ra93i6Fce68TAf64Q6ksT\n5Tw8o6JAjMxRIh84sEH7qIofCh5dB62IeEIjUEBxuX9uKBUPga8XO7J1GT0T\nDTETXmHehEcDsrSWJEM2+pUyy7ii9Go0SbAhobjczDvtl0UvjiXJwTjmKL3S\n04JzvytkicmMFrUIBc0suSywCmd/9jAcU/3EzZXJKnhXR0GqBgct4hw7DaXC\nKB3mbqOo9OgQ5hoB9JBZdGfyBUZoXbGV/4iw3pg2biMQH58WH1h/2zQxa+ti\nxNEO\r\n=nv3u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"5a3fea2e361e4fa6abb569a17ef62743cf78c2ec","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.13.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.13.0","dependencies":{"express":"^4.16.3","webpack":"4.19.0","fast-glob":"^2.2.3","puppeteer":"^1.17.0","doc-parser":"^0.4.8","loader-utils":"^1.1.0","schema-utils":"^1.0.0","serve-static":"^1.13.2","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.0.4_1560975228728_0.40465838373018603","host":"s3://npm-registry-packages"}},"2.1.0-alpha.0":{"name":"@aofl/templating-plugin","version":"2.1.0-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.1.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1bc0e83dbc33341cb4dc3d4998df5142b7568163","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.1.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-TsVPQw92LE+cRDLJ5wu2qITj7YubFD91xIsfEmsoxFM71MgGSH5fHEn7BRZ3s/IQrZa8vQX+TTbmvV0ixafpKQ==","signatures":[{"sig":"MEQCIEHuYzJXh6FL82cIiynTfUpmIHiEq39P9DEbpIwBVWoBAiBlgdypYn4yVB1e2XT554i2+5YzzEAoabIvCSrEyDMZqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL2OBCRA9TVsSAnZWagAAK1sP/jLKYEiJuLLv7GjfX+DY\nrYmHRA87ZDBH4UBCfqbIyHpyCKDsW3mkYLnkYce/U1bmMnQnhkf648CG5c78\n5LrFchtLTEUBgJRRRLeChrB+G9zawF9PsC7ryxJEMxIU5nKz2iIAjTgWIw/I\n5iBQSCAbAHdEt4d6ITaV4bRzf9baGGVVbQhchDx81i929mNL1QQfJqQBfpIC\nOs5/9RQaa1RG0y3zTZxuaU6HwLHVLxVN4kTcet0YXsIsKV6Ffw+TYe14BQxg\nuxhLZH3jw45Fnch6mElv9UpusaBlME66JbTngOmIDTk5IHc3deTWhsI2ZHsP\nQ7lO5w89FO/nW0qM6JgbsK0d2yW4C8CRZajrS6EPlDxVnaFSgXkiYwgg5q8N\nV4lRQn/emuoti1k1V6I9Pf8+jZWcOwQQa3etAsdM3KbINZYipgkfYgEjN6kj\ntogzCc2ioc4VnR1cOK5BMZuTQPDHZjFLcHxJVPzB+Wlg31KhmgwP8T1ukpE7\ne7VNPut8DkQBtZ9LKYH7Iemw8213tuQpUMSHF/sMpwFuafEqhvJzNLcFGYYz\n8tqgND2Uh/Tmf7futsnPuBoXA42LmSyY+346YdA/quH8s0kZlGm2NXQtlXfR\nDPpqkkmh7tKGgjM/+eLHrApZS9a9d69Zc+P40m9esWfBORvIf9S4Q9MurY+c\n3yaZ\r\n=Vzx8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"f3d01e2e352befb804bfb3549b9e9cb861099541","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.16.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.0","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.1.0-alpha.0_1563386752540_0.3453760933012242","host":"s3://npm-registry-packages"}},"2.1.0-alpha.12.4":{"name":"@aofl/templating-plugin","version":"2.1.0-alpha.12.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.1.0-alpha.12.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0a853487970e0aa1de01ac8d86938471033d1903","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.1.0-alpha.12.4.tgz","fileCount":13,"integrity":"sha512-wQcwJROoEFnGtAiKNGiVmwqTwEYvwhw1v8o0Op4X4YI22xxj5TPVnYbFhoCEtdePFtCLPokio+l/yzpvaR89Ug==","signatures":[{"sig":"MEUCIGV+YsRr/xGEqT8FIXCftwY7CkWBdlC2fv3RaDN4bRv5AiEA86uaf6LY741fO4vaxpxxld8u00b5XdAkA3sGw8slt8g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf1SmCRA9TVsSAnZWagAAKJAP/2jeLXYTo2UGpr8w9UIs\nq3Lar3alx+amIh9e0pa+P8g2YxhaJO+IpbCxe1jXSRvSGBCbSBzpa/JlRROk\nUM5qtq8NZu+nK/DgACZKXeLuNQHTkDlCask68ImiI9G6CHQhtmptTZ3DcHZc\n2s99qINw5XdqtqgUe0SPzhEJ2uu/3QXVuSKcNx3GOhl8XsoFurcSKHAfgGS5\naBvjP5x5KjPT34mfe1AyvjpjpoB5xhVV36IOb6k2T1yZhpvDlmFPkBLA/DIA\nh9VzhsIYxLfiwpEbWHdPko0zWiR/m4F9T4Xd0qIUySTQ/usTwgMhhlhgPTSE\nxk+sXuO8f58YKDEWOB+vMCt+hkaSX59qHXqFK24kfK/zuOop6+CNKJw5Ejh3\nHWLj8VY0tmpxPCbxKyO1LHxYGbTE3RcPouMDsbN+HC+MRm6rWV4tYT/wAtKA\nhHUgfbSMrKIZm08lxiu3cZjcN/hy66cluvFi5Sxj399iBHqwmxA8XYxX9USN\nhO99/upK2U2Hgi5eT/uEWKMmtXuC/tPpi6pC5nT94l1rXQaI1tQpqODCsxVE\nFZ/EeH1OVcTiuZ7o7LzKL1kR4cMF8EQJg5DpT4PdAk8shdOmXHjSUYBKp3PT\n5XLuKQ/sBhkVAdBirRWOF2b0pvLPyZ3kklLEPNbQSUn1PtUTlMyRTO/VyCf9\nIXCT\r\n=H0wM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"de52e6fd1a25cbab5a1c386045b80685031b620e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.16.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.0","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.1.0-alpha.12.4_1568625829957_0.8924124037891568","host":"s3://npm-registry-packages"}},"2.1.0-alpha.13.0":{"name":"@aofl/templating-plugin","version":"2.1.0-alpha.13.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.1.0-alpha.13.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"59949c97a171a27f34a1df2b0b5c2fa457cee826","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.1.0-alpha.13.0.tgz","fileCount":13,"integrity":"sha512-+jbAz2FP7sZvMSTbWHR6OiOH7D57kJVccWKSILGnB0wX52BcuAtf+e7uov7CN8HxsuToW13TvruWK3dm9SU6sQ==","signatures":[{"sig":"MEUCIEtrUzDEw3RxiH8s1qlLnZIwGuJQ4wpSP+MnqeGJFDTgAiEApmSi5axnk2nZd/j7/5LVGIr2XzvmrZYcCncYSMZMyuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf2tmCRA9TVsSAnZWagAAyY4P/i0P1VG6a2kF4CATjzV3\nRyh0NdNNfdCoTvGF3CNAVtwrNn06qGbZ1Frlz6lgT81xoxVQ4I6PZ8xM/sfY\n5H5+JOHKLvBaA5eyzAfQNM5C9cuAZJElj91M4XvX7n04aHBH/LELSFYs5NAS\nON4w7jIduy3RHZ7fG+Et/Op+ffO+h/H2LY+8VNDBo9xpyPiTLCIoztkN8bnV\nT7dKmGpedZQZwC2TJ1RSjGl401/55+VSXoM58kYcq9gikgI5Jm2KXcBqHvmm\n4WvejBcWbzEGAIdr2MMZU/RiHXEbkF+1LFdEa+kU2YlJmaAeWlTVd2/9WAF4\ncXvmCEfLW45r5e7VNcHELHKQG5ctbn9b8SiYjE8RIq0aPcMhxkZQRufBOGhl\nR71EX1ZqdhRr35+AqJ6cgS9uWWWuDCAuNACRaQqz4KGFbgEo/8xHiKJ7zbXv\nl9oq7/chT/RIaMgfzYURlgNUfNNjXG7eE8wo/cjwaTetsjCNe+UjydM+PyUn\nmGgaT7X7lCJbl7SuswvuSFcUcJPu4DUY5GyQ7FdV970WPpPqJJkFrCMIu/xA\nQ9zlY4L4xyoO4/E7s3eg628rfNScpENoScbQ9i8PvQUPJw+dFnwdF7yJ9Er4\nPbM4fxCvsmvas+COvY930PFCsgdDLyWLS9cjDm5XdNrQDXQaO0QubTT23A6d\nEvep\r\n=WxwS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"8ca5f0505b50c26bbb5ae1950ca8a27e8b7604de","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.16.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.0","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.1.0-alpha.13.0_1568631653910_0.3285669185295632","host":"s3://npm-registry-packages"}},"2.1.0-alpha.13.1":{"name":"@aofl/templating-plugin","version":"2.1.0-alpha.13.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@2.1.0-alpha.13.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a69d9dd9dc0eb1fabd56b1cab791afad3a118f9b","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-2.1.0-alpha.13.1.tgz","fileCount":13,"integrity":"sha512-9tlysS9YjQ3M93iTcfGkROJkNxQjc/naWYOsIKY5VIzuT2aXJCTHvaL5ejz22BiK8a9PNtHnP+9exbU6W3yK3w==","signatures":[{"sig":"MEYCIQCmSbSMNzESaUbDIt/cK7IEWqvBHpfGKmq0FqO+rEdIEgIhAM5xSHeUdK5cFTYP31P6uwz6C8cCtatqTmz9QV3SqtiS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf22FCRA9TVsSAnZWagAAOwcQAJEgKOzRoASnK5SDobrx\nDAYptnlnxO48lQjD7oveymcHtV6WCQJ9J2JeFJiV5dUBy/tZie/kXKRHZNM+\n7HvtwqfYbPKFHQl3PKOstqc7dUOBAIUMleb2LCFgAiPUThQFsdt6Hh90nUlC\nEjNcfB5Kokzk/8+7a5nCbMayuTyZfFsUtCe+M0KNibCnHfVFG6dboJX6PjiB\nHCg2+HGjlKmof9pYZ7oFcljYuI8d9ao0ZFnDQ4g/cTIn5XFboF22mWGJtxtB\nbFzbGr0ocK0j00tCB421Q8WnNnYGhHeWw+MYflGiUsaLVrYz7HLh7j10uKRg\nYCTxwNwGS4+683rUqQWGS5rwl2arhK7z9VVJOuzcv+mRhl2hwtieyrpr+/cd\nxdraLm7gmYgpgAa8IX+Ktx5NvVi7A6UZHHMNwEvIb4kFp9rataUnKzrFNN6Z\nwuSty7wvL5Ccnbm1Ua8Fwq8NjMmHyvQ/Z3JswBNLaDh26M1K3h8lsE6OD/6a\nrY3JfAP0tEQkg1WsziD0dsH2jMUee5Elt9yStOJ4tUu2oeG+fY1z7kQp9NEJ\nt//smTuk2UlXekmUwLzhMp0tttnxzEKZp+/3DITpQiH+VC5/LuEhRr4Ueix6\nJuoEnC6xRkER5U4pnPBmNLen5kHDqcX2htaCc3pKw0W61CtXjEslhUzzFyRK\nri7v\r\n=38o9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"60bd9e58cb117f95e7951871dbe851bf8b7948c6","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.10.7/node@v10.16.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.0","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_2.1.0-alpha.13.1_1568632197291_0.14756045848984023","host":"s3://npm-registry-packages"}},"3.0.0-0":{"name":"@aofl/templating-plugin","version":"3.0.0-0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d6812ff55cf9741e84526245722948ac3fa8c69d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-0.tgz","fileCount":13,"integrity":"sha512-Eup64ZSywXTDg0lqcr2/CuBILn5atviyzH+gZO4AXY+A+9FaCj8BW8/cHOq1kVJGCZiCQIJwIbTEW9T6bubZYA==","signatures":[{"sig":"MEQCIHy4qTCCGBfDDj8yxshFXRZ8rCDYP1fP1qHeDqWeq/PnAiAXFqdd0omj9DzXG/IJp0zK3atJgbmi8bJhIYDlp0zGKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgG15CRA9TVsSAnZWagAAQkoQAJiU9A7ybQu/8KFE2bnS\nVMcIjxHqggaX/tO1/yGrFUiPJ46xa5n2emOXqgiFnllCpt7wOR+DmWY0E3Z4\nk1PRagsB/MC8WxuUuWMyTj90pzX8yVbS7jmtS0tx9DjVzIBMkH//J7PUl+b9\neJWkEAB1ZUMHk1pszRCVgXhS5rUomfOaAag+GPjf2FiUFW5pV7zrnhAeeQr+\nmPN39HvP+YrGFs+o/e4wZtDI8BVf7UInpW1oQbtt3Y/EbRQY3cctmC5LYBnA\nPjuz96sOUx9YSqe6cxvJwjkkp3mAbHXzDsdwGBMSwgIjcwlGPgU6S6Ps8PLo\n2wfyD+cY1Hu09DU+Gm61+WRrDUfyZ4xUV71B3tR+32gl7sUv+/G5liUx5DUC\nX7KST5ggoWePxyJkjzmKMWfqkS10e3JVbprjScVsQ1/LAnOBYTADeVbnpQNF\nqFrcG7vLXVuwO/obeN/3+eCglQQ/p2PM99Li4bfGCnrB9ggYyuK34jIyMoCQ\n71x+gcbOXkhoUOYauMYZhDF528yY3ulT7auu5QT+MSiobuKmX3uZ9qbauImx\nD4nQ8BV0uLxbJ3LIu5khmyscKWmdgCgn2TqseZOxfqEGpiuz18NASUKSL4Uh\nAQpP2E7gqAMMJZhGwmvHH++aMOQtp2goUmky1YSVQBlXuNYZVeiQ9fHBfUzf\nTEsG\r\n=CVm0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"68ed707a605f1a3cb02ab70ff9ed8a188867028c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.15.3","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-0_1568697721172_0.37009873114852265","host":"s3://npm-registry-packages"}},"3.0.0-alpha.0":{"name":"@aofl/templating-plugin","version":"3.0.0-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"4cff75f44e31b0f5ecc4d46a8aabf219d3bcbe56","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-alpha.0.tgz","fileCount":13,"integrity":"sha512-iK/uEjfTkOJ1jUzyJcdYCOlzfGe+SGzdm7TiUxlbnJjm5sbWKVLFaVRrDR8BhdO+pCp3lqV76xfKINrkLFM5Ow==","signatures":[{"sig":"MEUCIQChxlKeY9F1dfS5aaRr4JziaUl+tATmpbwOUvc792uM2wIgCw3OYFheQ1Sci8HUxCiW6gPcC5lPTt3T6riQjGrUKS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgG3zCRA9TVsSAnZWagAAG8kP/RbmC5c0luhwkgJ4bBiU\nUTDAoU6CnSSL50HlT8DT31wWm4Aeij6NPKXmi/6/oASs1VvWBYvZFAe2HfO4\n2q2Psy0kfzNf7uagQxgGeNtZellbIa/3LQMxkml/IBIHDgoxGV9ThEwujaWB\nIQAhp3eHzyWKyxvfIuyOFDBj8ED+W12fk4BVW5xAAZ8t6qbqxsXCaVM/3zE0\npi2WafeITBHO9GpovEjCeW56wDMBjUMJSLG/Bp+eCOBz69KC5A6Wbn3pDJ6L\nYUmpqrZhY2augyvHms+J+93QEO+Eoydc9Y0u65DUzZQ/Id2wIdUBPImWjuMI\nEN56PVkYGCi5yMqLuESCR5OywX2xwT5glgcnoFyk0Y872/PcHHpcVj4VAjjg\n6J1vZEZh8+37xpWsaaqZBmo6nkFeSjo1WyZnYCLxiUtfeL1TDU6hynSFLbxf\nMz8XtxjgItVRS2asGaBIPUNfxgmJ7DZMzvRhUxlsJFZ0x2B6HPeUDd+6F+sW\nHm1s8q6B/w3ErlK4CgIlLXkuey7+7eGlR/cwsQd7DS9sBat2Z44B30HW8QCc\ntqbXAyJ5pgqmWvNblfOXv8Di68M7bBDoqo7lVajh/l/nKPUr9j2H38GdluQo\nZFArJAApVuM6b/HW7D2/NbenPbGRzyz86UsNTQ/+V5SPCJRID/m5GCbBJYdW\ne7KS\r\n=G8QQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"c6c4d16f33cbd321585e3e7c86b1aaaeeccd3627","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.15.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.15.3","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-alpha.0_1568697842901_0.27547546514342214","host":"s3://npm-registry-packages"}},"3.0.0-alpha.5":{"name":"@aofl/templating-plugin","version":"3.0.0-alpha.5","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-alpha.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"848bb3f6f191294f573c908851b5945f78e981aa","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-alpha.5.tgz","fileCount":13,"integrity":"sha512-mVkDrAoC//A0eqrcUGGUPLGZgOVCaV0+ukaDWjST55UOz6XKG+frx9X2oBzE8eUWxqZMlQGlVQ/EpEzNUuHibQ==","signatures":[{"sig":"MEUCIQDjGqbW0anaSPJ4E2oOIkggxoKUYYjVQ6v9WgXDFTWM9wIgCPCIP1C5G19oCViezCFChDC+cLVQU5dtBXHummhqCSQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhHKKCRA9TVsSAnZWagAAuIwP/R0yJqXQPjUHweGHrOMo\nrI+JQBwQaOutPgLt6P9aZKT+f2XrnptvtMmZ0h8V0OCVR8lv+mb8NmUXh5LA\nmKtDHuvKvBvwzDN600cszW8JiLW204Y0xX9sDjuCt5Rdu3XFErpjNT6jjDPL\nk7M9asfxAbNIRfUw773nVTT/xdDPQk34uZDmby0xpCcQdjrNe8MwrY83OAuL\nTekYJsI9DayfAY2i5E4KXw+cITTJdYeibj1cq9Pu+d/P5nl93xssuSu2xggf\nvOZApBgfLklcBPOqvgXvrrDNKDQKdRUjszHiGt9O8S4LLm5KkpkqAsMMwGcD\nWXxtQZpabiacmf45ZQuqjKNFAK3+P5D+KYkdhMbMWJVDO59g0HQI84gRsXWm\nVWi0n460gj73U5obhuzgEaM5r+iIjw0fIIEVB3nFCNjMVvGIYpvQ2Cz3I9ai\nJUsZYazR/Ik6Tm8oi8RCWrl6tDyF9Z6jOvajEkvssaQc0i8gONoPL7duX6iw\nV/FKurWIl9IPhyEvEtridTwAzHKazK3TJ5xYLsENksKO2dZ+JPCST2TXRwLY\nr13/fOGmHmzcydffQWfnBUM3AAH7dS+trJjpkDfIWvYbkT/FVe0GgnQsl5VF\nNXv9AwjJXfJPygpPvP3UL9B7xzsbd281gUYijPQBuGHzvS1DhzSL/qD6TQHD\nS6pt\r\n=hN7D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"09f43882b317744481f4b6845b1cfae0461775d6","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.3","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-alpha.5_1568961162338_0.6397774057188264","host":"s3://npm-registry-packages"}},"3.0.0-alpha.11":{"name":"@aofl/templating-plugin","version":"3.0.0-alpha.11","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-alpha.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c85f3714a1b85d2ee99beb8c3885af1f2f98695c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-alpha.11.tgz","fileCount":13,"integrity":"sha512-VjpYjHmSPb8hjWcCQnvEVe55PPG+qjq4O0rC3m3tk+MWIjPyyrTO9yrqL/ThfieeyECi3k65dIuwSUorUenjiw==","signatures":[{"sig":"MEUCIEIdAtUOqoC0l+COX06Fa/DDBegdeFuggbkZTVaX0SYiAiEA3IZ6BywY7jFhUvZEEvABTwrBACb4rk8Io3BN2Fud9Fc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjbD4CRA9TVsSAnZWagAA5YcQAKFOL75IkkgMdtKLynti\nBUjjTJs07JxIYS3sOks+m5TXd7QlJTwCmE9ojm93JoimhhVB42n5hEKzyUKr\nu8IdswQB4NWlQ5jxbVuy9X7qI/3KZqNxhTtTThWZNCpRkds7GJVcvm1bklUX\nROJjWxMIsWzUP5gVScgDMynJ/jIVuM3ouiFgp+jvKozRno7/kEC/ZLRaJXHq\n5uiBWVwSWGzSeXvQApniGW1UTjF//gyu16778/JtBRJ6UkKpicE/9HsVAhLX\nbW8d3jhHnNnLZwLW3LPjHzDQIZc6BEGreDfEYk3cJrF+DTLVQYs3IWdnhhpV\nMk7/Kcrp9iE/iVP3o++KkOazJ/7dHn6eopT63PuiQKRmYVVojJhuhWQ1XHT6\n5ZxJkkjkdLV1xwQG9sJNCJ581BkxYaq8J8MedcJb+ZC1DVQx4RPmN4MGdhex\nUgc+eFudihMkoe8w7l3vPh+3iCyZMGSZ3EMfyeWiN4anotSypMXHdrW9on1J\nAQTQnXlogPFHpv+lZBwtl5r7h5zlurfCAGx8BRBXdVN5mDMI7PDcJeOis7Nv\n/Zvwd1cO/cUCOQ9ogK4sBzO6JVJTk+q4CrL1fKhx26EK9reaXbdGLgglhEd1\nUdtlTku5pLEmXW0ZQZ3EH6ST2OJZW6ghO/wSU9+bncc4GBHUdTd8MpgFy69h\nA3t4\r\n=nypo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"ecdfe7e68c95cd3ce9eca2c86626275d1d4559fe","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.3","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-alpha.11_1569566968123_0.9635643158080851","host":"s3://npm-registry-packages"}},"3.0.0-beta.32":{"name":"@aofl/templating-plugin","version":"3.0.0-beta.32","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-beta.32","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"65ebaa3b5bfbb66b3c6d7dd95fc1737c663dd637","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-beta.32.tgz","fileCount":12,"integrity":"sha512-VItUNkVtILphw3WTfA1VJ1iJ68/xJ9uUYlXKkvfNmJ+flKK3lGmJkbnhD3nGlxIwggqSywvlZQcBs/oghloEtA==","signatures":[{"sig":"MEUCIQD/ZrpPdNfpfnKBOS2U5GyfZ5qeaWMVUVlj+mpa+VWNRAIgDSBg2SzxVkkGpKPTgxcGdl1rkSKByNsWuiGHMyeyy4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo8uPCRA9TVsSAnZWagAAG0IP/2yP/AZGNwCgZS1RVgTh\nW3QlUDz0AUkHb9aX6z99lgX6xPWwgnD/6XOj5jenjcYQVcJ+yuGzHu3OobS2\ndduCRKAr7hWTrXR8kuIzfBCo9sgLHw7E/IDnhhMCQooo10+sNPvqakxucSKx\n+uih7GqJ7KGNZP/TncKMD7gXMMDwNpZedA5a98CgyoAIEvLoHzV/nnl97RVu\njVfHdtb3L+6rJBDp7KePqfegX5PZrS47mFQ6KWr3FpMOekgcWTttJT1C1jnV\n1s+7lJYQbPcmrQC3oQjhD538VOaHRah+uQiLzBv0x8Z9UKUL2cVzBDfjdrPJ\nkccfkQoQGbM83pin5mRobMnKmLwjnDDbQ5XGONR55r4atTHL13csVXtSaY8H\nGmtC9AvP002QfTxJ/oS6N8bNMPJxzM1pvvdyRn83Dfcng8SNk3eo3zJoUDTW\nMaRhr6F8fknrAZVvMvgxssdHnTDvdtbRsA6t2HxHHqrkONVFadudydwkMLR5\nNJUiiv3z2Pz+2sN0ZXeKErNa0EAzDCsXQetEFZak2QDUTubGaXhJmz0Tt/II\n3yqU5VP5mhfcGt29XM5zsH7eHgFGJKqumMdwLEdJVDuQ+ZI5RIOfqipcFLmN\nJBf0FfITXsvJSrBi6IQ2EC+dG1DM507UANkVYG4qWjXol9M1xSfWne283k8D\ndTwZ\r\n=uGK1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.11.3","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.3","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-beta.32_1571015566628_0.931267269034237","host":"s3://npm-registry-packages"}},"3.0.0-alpha.12":{"name":"@aofl/templating-plugin","version":"3.0.0-alpha.12","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-alpha.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a5462d9507ef9d72d4da0617814679dd336961b4","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-alpha.12.tgz","fileCount":13,"integrity":"sha512-FuXRcV32z0nGPRM1Xt1BpVuYrQZb7Y4twRmv5FroVfaAcYWQMcSgnLtZZ3jVREyfJcGlgrP1VevEsU222XzCMw==","signatures":[{"sig":"MEQCIAWNGVR/+2iu5WDTocp9CwDhlk2NupdyhH/lU9IIMmgQAiAuD61Fnu2ODwQQ0MQR6GuEjrOuR4YnlUjRyvjEF6UoAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvNfPCRA9TVsSAnZWagAAm68P/36qT/sL/Oe+rbU5C50s\n9dPOAJVTgCT3tTucJzPdfrPPVK8pS5O28OhLoZMS/M/C0Yps384ZREc2oj89\ngHzsbyLUTzwF7TV6EmiLcX81Z1NGOFflFEhTGteGA1Fq7XRtGgm9Jp/eAGK7\no84RtNyK2zglz0DmgrsYi2Ko+/uDNKv8PdpqUG01bpv5ob5DcfkD3cv6PiC8\nF1L0Pgk4jlqg14TgHNz7rfo5DnI3vW8ic6h2M8alovmzEAGM7JUsAfM/wzby\nj92Se6KOBVti/Rs1IfKAIrGO6mZZx4AeGq8tRLrR250PDrk/E/ZktrzCfSOS\nrDvRjISo992kMpQV6fFfqctz9wBN7DguKVlTGDFuFkKnxaz3ITTviciTnnoG\nFt8e+Iu0FXQX7PVRB+9YR1gfjarwlp1bnv/JD63M7tb9SEHz4LCE4YzNsZ+G\nsAehO/E5xLhwh4RkiIGKlB9xYOnPuMPG75Q1tBeCDhT9EkpPu0lyyp7rhWBI\nf4li45Qgx5i15frKGKt8eHA3yQ+m2qLlSArWthdRJuk95nFosIbV02C1gp1H\nut7vHWPk3SkiZOiZDg3H7W7NFVnkfWcnD8S0w2cwIEkiN0QBUk93ggxE3mRi\nC0Kj8YJScL/FZIsQVFs4BuJh1p0JlK6LW2EAG6+LNNsNiP4cOJNRLE6KLXMm\nFBsA\r\n=YNxZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"e76c3cfc8d75ca087492088254c9ef0e4010c0c9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.3/node@v10.16.0+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.0","dependencies":{"express":"^4.17.1","webpack":"4.36.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-alpha.12_1572657102889_0.8298760208779163","host":"s3://npm-registry-packages"}},"3.0.0-beta.49":{"name":"@aofl/templating-plugin","version":"3.0.0-beta.49","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0-beta.49","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"46afc0025957d4071bb4da49f5d654b5d3ed4671","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0-beta.49.tgz","fileCount":13,"integrity":"sha512-FVr94no58T6NbpVQ5vRhj2b0+wMEu3qRbisxcj91Wwpxgw9mNgxUqdshHIGFF8HeH9mnrw5yaAC/MBgSwYuD5g==","signatures":[{"sig":"MEQCIDUR7UL1ka4dgWoU+7toIs2eOWT8EC0QLiG6ryEqO/RSAiBRJKNRfmgUijY3UeuNpeBfQ4OAGvz8MXMSlQh6gBd+GQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0MCfCRA9TVsSAnZWagAA7CwP/3Ac1lZKdBcuMwcygMYW\nXF5DHXRPCYZJWjvLpgb+gqc3WmHbnmN9kzAiNkZ5+pIxViWLFqrC/+PJoPOO\nnWnHu09tbUZXvnLGpnyC/IRul6PACadajlLuITVL9N86pnYgyoVjGPeju1fj\nQgXN93nKU4EHmH4s9OD3cD6Dyd5ItiNZkjG08dAYjm4SWVtlYl7lCNvijXkI\n49V6KhLwWdNMTfao9sq/2Wp6868RrTIBOlYy/L2uJBSz6mHqtPt0qF9oZaK7\nvEXWtHUfSslZuA4XlzLSOoNnCxR1t3BfTwcEtl6XtO93uYfMRvg4rP3TIn+l\nOFtsWcZH7kh5tewVnh3ubIY7nrPKepAnxz3+eYDlcuiY1sQW8aIBnQmj/C1K\nRQYmaD4/xCAaQ80rDHkY1bjrlCF+yk04tK4zKq3MjiNn+NtJ9vJxDQ8da/fo\nMMgLqFht6KsNOte8xqLTHM0CbMtisnbCsPeKc2VUr0s44OiPqtQIHrpnqBYY\nyxaaS5yMNKU7RC1vIhzFApg7qxIf2mK0RDwrl5wkANlCQgmDEPuNawLAHH4l\nH6NXJtJCZgANCW4N15v8omni7atqGwbcKsEsI4ALxM82NVk3Kuj3lOxXFr23\nZydZBgcCz35nMheOd+LwZ9BpbhXEDuqL7gyPIzg2BanAd73GQWV45E0CxThc\nZIgm\r\n=gx0W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"a2642ff8dd100adac8db3d609f63e2bc6a2247f5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.3","dependencies":{"express":"^4.17.1","webpack":"^4.41.2","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0-beta.49_1573961886924_0.9369181314612749","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@aofl/templating-plugin","version":"3.0.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.0.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"eca31a2483d48ecbbd4fe478487bfe39129092e8","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.0.0.tgz","fileCount":13,"integrity":"sha512-4Ck5n42tSTNZ2rx/2RhIcQAlTja2f9p/PDtl5PXnVYqAvslZGsuvyM8POC1PX83dmy3AOkc6yBcfRTuXKN8+Cg==","signatures":[{"sig":"MEUCIQCR70IVuSl1InMv3U9QTXSVw3B4jvzPXAmtu2rg46vBwQIgbh6H+SlQhf3ezIlj2cSForcfY4zoa+gMzWzqz7JcL2c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0PFuCRA9TVsSAnZWagAA9rgP/RIXbNMtafvyPMWWWyEy\n2wYv+p5phTD7PlyXglqnf2NJOFfWmxif2t8aEx9jIFNuy8Wey4uPUraKh6rS\n8BAEhBNghYRyraGy9lC6YNqWLNcp3x/Ctyy6uU/NBX13p/tg+wLVTGJq3yzu\nh59ZzOb8hNa48rjniyXVPn6hT8j8sC/rr4ixlsITz2vzbRIxktMXxdTD5y1e\n/4YCNtM2BgZr64LRdK+ez1y4kMjnMcQc5eHRm0acPrWxxDKGgOlDuSQYr/m2\nwjYzxqu1Ex+TmAHlr6suaI+6urz1kiFTx2gqPFMTXlOuqVAQ0XVXeyzOlNda\nPsWZgLXTGUDJnWpQqc0eMX9ZcOxlit8bTFOUDNegNpCDW6JHE4dlJMb2Wp3z\n+tn1qwfW3PR/vLrFykQIVxaJsvu5ApU9dNg+imnWHbfHE9DkMf5T9vEo83hY\nNC6izDykcuEscsLoaZ9uqwvR/mPeKE3NlLYX3cc6xVmP8cWvlUIzLDGWRmfz\n8nI4Kj6c8C/2Meme/uObL2vztTj0UKETIrVc1fUz5wS6azEGn9w1Gk2vwlZl\nz+Cp2kwS04CJcUl8c5Og/Pi5LvUZDq7zNUTJR//9lYBX0m5RyteaTGoM58K5\nvRdok8+HtCgof8iVFErR8q9oKwYFUhrGKhtwr+l4JO5YrSJiZbkJWhw7vxec\nIIdT\r\n=THTN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"bd783440a25a2c579fbb506b92d90bf4fb7e0289","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"lerna/3.18.4/node@v10.16.3+x64 (darwin)","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"10.16.3","dependencies":{"express":"^4.17.1","webpack":"^4.41.2","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.0.0_1573974382099_0.24971117376640595","host":"s3://npm-registry-packages"}},"3.3.0":{"name":"@aofl/templating-plugin","version":"3.3.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.3.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"25cfb92b2ae9c5f16cdbf5a8e93d9005d5050151","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.3.0.tgz","fileCount":12,"integrity":"sha512-yz5DlWLr4gNN0znOUvdVrR7dnkpCZBr4B/r9e1ywlg5o946GqNHVbpFzmCpnp8lmKn75owT0GTPh5STzwU602Q==","signatures":[{"sig":"MEQCICOaiNuj6KO9Za5WscbOVEtfb4yDWtzzJ1DfnnLsd/UnAiA/2vrRP8b3Hz7sqK+JH5glzfq3NIOofH84+LLOM5v5gw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKNsjCRA9TVsSAnZWagAAmXMQAKGOUSMgLqM+wjRbiK72\n1c3YflukPLO1okqFoC9zKFTVzMuQsNLrm4T8hlxBOf82u0cYCLWM3i3lorwx\n6dWGiGWosAybcf2HAjAaIItFR6NW7QjsQ7/OjtyWZb9u5cbLscyXLxT0uSmU\nS8foDpbu+zI9NGC/ZzuXTwJhtSaePBo7I/l065ntWXKiZI8etf7b1YVZMTSA\nrr8onnUiePobfD4d3bhibXfnynRrxUKzDuySNHkpEyZ+TjU16tukwOyrFaOD\nYNZsmt3ayFoClI52zT7ZspSs/EVHeRRL+hSQg5dgQi0pCGqgVywhbWGjm6t0\nfHlaiZIpiWYw9mdZO4buejlxKrPMGFB0yUDmkya3a6BvINdekumAclHjGYb+\nAfmEyzt5wf4qIf+UcqLqHYPoYTNuOZkc1sUD+wrtue6eNf1Rh08d8DqV+jOB\nDl/MjoL8c/oOegE8xg8gCO2+SEOLVbHt3yLALIoUZecFW64RSqOPbmppNHuT\nHBHf8srVxTOVjjNv1YwoJi51xKB9BbpEbr/odB/Co+l0BAKfDmwAQxl4C+to\n8rDShW6igJu/hN4fi0bgRyMFBuQjfh33jQlKXiahKUK2AOoOrkmcvcA7lPtQ\nFdPn3PzNw/hhBjQdSw0yEq2E6IZT/Wx8365hd1slFLvHuYVwVRGPCjcyrhfR\nAnu1\r\n=UMpK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","webpack":"^4.41.2","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","replace-string":"^3.0.0","js-string-escape":"^1.0.1","html-webpack-plugin":"^3.2.0","lodash.defaultsdeep":"^4.6.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.3.0_1579735843341_0.11060319832245402","host":"s3://npm-registry-packages"}},"3.5.0-beta.0":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1fd010a643d14f31a885db4b2d5d5cbed0c37d93","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.0.tgz","fileCount":12,"integrity":"sha512-XSYpUnN/gQApasnuO08n+2jMA1SftIEQW2QRCNXWjomPVowzUP8Lxgr9AcuPaBHBBv7XKz54Ylge26ghHxxKKQ==","signatures":[{"sig":"MEUCIDztHTm1fLTiMObeoVkAbSqh2LUR4HXmUFRAsj/HLwMoAiEA50JiNOr7zHeMUGuN4cDzLMslbucthkxdaVD7WXX9Le0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUbN7CRA9TVsSAnZWagAASdUP/i7ekmtHzJpxuPOCaBkH\n/HcpCGKvo3+t6muEgnG77CL95djkQ+XJhPgN76TggFamB5/logsjTxvw6xJ5\n6Mb2qUwhrUOuqoJLFZqJV5BcoB6SM3ClxsKJsv9odfOHBYx9Sx7QlMnW6B9y\nzGYdVjcDQ3hKTFXv2aejPfcaIkltGVyi2UwuOhllvXXNSd1DXX/CBWFZaI9H\nalvNQ1CGK33DpWPalKmxocqmtIX414gw9MpaPGkn6PvpboDy9xFb/81fr4yD\nFyhhso3Ra0a57q1ywOxe+182PpnI0O/KbRO3xz08DdhELeUKbJwxqvRhXbbj\n2Gcn+tfxaeuaXy1qVHUEikY0pw78uUukGkumZi22tBujNU8egU/3Nta9NiFl\nlIZ0dbLrnwq3zVP/tAw5A/Fdza/LYb5/ytxdLzTqEFl8fgomxQ/k7GkKMOTn\nXVAsFDTbr0r2ZiRRXJMRWmHm48iXx19zGFjXY5I9rGSfWyFp8MDEMJtQQVlr\nEf0SiyjIVjpHnWYkA058+O4S9kYJX2BhZhZBSqQyNJfCiNhwEAVftgNDmDvL\nz+eoSS3ocs1UMFunV/oVt62HA1MMPGsL9+pFwmlyYoq6XyVvfqeklsT+NPCM\nydbs+HR+3EnrQl9HxHzYM8jqkgl0TF77W8ZlVyOi9jsDIXCUVQBRdPxi6Wix\n0ZTT\r\n=Yd1y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.0_1582412667332_0.2586055198824764","host":"s3://npm-registry-packages"}},"3.5.0-beta.1":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ec9be8857962cd2dff3501661cfbb5884f475b6c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.1.tgz","fileCount":12,"integrity":"sha512-C0Nm25j70b9Yr42XcKxRkcU3/7a1P+2fE6tQYPtw2I/TTXsBC8SriXFofLddXH7HEaqG5xeowWD/l381e7l0Rw==","signatures":[{"sig":"MEQCIHMRbpUZlaypmIRP3YPsOgHvim9QAZqKWgTSWcDXk6u5AiAjUr938k+kuGKzwBFPBsWh6D2fUilLVNna8Ka0DzhpIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUbiICRA9TVsSAnZWagAAU8sP/381weE8QBbOv3u8hbNg\nrE/ElUtOSkYCRtZUvMuwAUPLJNqnifK2AfAwFTE/ZGm+1Nl/jrHc2MyUPQFt\n0BO9Jp3odLoyTMxP+ThrcfRlDc3vJSFrW+ps26yGChXIAUuJHNG9pRsKko8v\nRauPQRJ0qMwNkD+dZe47TTAjjuYjJ0MUwNp62/2r4pwZXoVCx+7gwgz6OLtT\n2ghK6dZchje/vqQvksXnc74m1DCgxWvq1XozXijdGW0eK+p+i7LRdGR2aewY\nfysjC/CjV6Z69L7UMxcMvDMyl0FWWEbySSrAjWGWqFt9sMQ4O+lK9xFPjgT1\nJObsh6DEBPgAqlVvQOVokpt/6nLcRoQYpISb0+2GYRsvCvuOa9pODAtljA+l\nsQJ4lJRmVuNpPYLE65jveKnN66Y1dFdq/Gdrv4sJ1iIMxLsHSuBRwOZ+HO7j\nAnzL/TppJXI53DtjgUljSa87/1jU08fvlSoqgJxt5/Myc3wzv88bXyN3a7Ca\nwyvK+L5jtSOs4IrlZhqzEqJCdhsQDP2NEtDfqxE6pDcQn/KeMTAbtr9o2wso\noB4JgMdYs6iyfIRtp5WcEafToiSm56CR+WdRDTgPLIMfrgahc6dgfLWQbDI/\na/rQORixHAwC4DCTB4Yf379EigC92aJ63pcoZRtuWJ3LDoGKk/k6tXc4PY6N\nGrdK\r\n=Rfdu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.1","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.1_1582413960219_0.2120784306207253","host":"s3://npm-registry-packages"}},"3.5.0-beta.2":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f2a7f629d0674e2ca32dafcd12ce2e1fd651987d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.2.tgz","fileCount":12,"integrity":"sha512-xQc5Qb8cL37QMQcbRfe82G20JSr3KMNFmT8a54BdayzOheKiZ4YTmAFz0n1wmIr6hwdUM7nxAriIgqAC7F5DCQ==","signatures":[{"sig":"MEUCIQC/C+t/REA8vMjXIi0hIRZt4FM0zQqj9n+dUDo4a0mAJAIgY9qo8x/vf5lRsb/HYwUiJ0Ln+X4WKwMVdLWkvDLGxEE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUb6lCRA9TVsSAnZWagAANjYP/igkr238qAzWNy2uirxM\nvHY/SGs1WiZ8tECcnVdCfqLh2r1OCkAIwz4gl4Wk4oMZf9//6deaYtaJM568\noJd85PT8clhm9sgru/xr+rQLpjbubOfecgePcsea7yRMcsIhJ1SEQqBrRLAW\n+HiAwNsEJ1XgxMO+HLltd+n3/QrTMuVNmN6i1R8SJ+tp0GZ6kJy0yFmPLa/7\n4AADiSDAO+CvwaGuQYq64QVjQL3HqhGvbbb0C58Mbyj6ejCRa8ex81aK8cUi\nC2vwpxA8xzL9QAXBvb9e/3OPY5Bal4Z20x8uKfiDS87Uci7+5XlT+Edtl1QJ\nVdMGGS2l03ykA0yNIP1fuaksg37pOCajg0utBqOhd/K+uO7wjqvmiN41bcQL\nmz7s/598wauI+Xd7eIXHwsp+qPYYg8d1oC4yX0k2gWiwAwzoPV6Bvj4wk4aO\na6RhmkR7YkOs9BHiV6hoegQdGOejSV8ts46ZOcg1GGbnA+GBGT34oyNh15Yk\nK6BYbxPg+iY+LkbDrAQbu0eYZ0CsWCJwtJ6nGykojPyrfcbpMCZeH14FjJCx\ngNNXou5gjOj5nxdb4dvgBOj4czFMMC2Y7ccoj6jXTwJB+5ida+9i205xH4Da\ny1W9su9fCscul/ToasILBRSh/bdNIZEsUbGDU7LwKhq6Y5GbknWMQnYp+nIo\nF+Kg\r\n=vkqG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.2","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.2_1582415525099_0.6520545206018014","host":"s3://npm-registry-packages"}},"3.5.0-beta.3":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.3","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3b148957f62581d8aa25f1e2ec5d6542a8aefddc","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.3.tgz","fileCount":12,"integrity":"sha512-m4ch1tlrfsB/tmUX0xNSGcwYz/ZroXV53EySfbgk1ZppszuN5Z90U8NJolUk14UR3Sl11KBxfJHCv6GQ/fspZg==","signatures":[{"sig":"MEUCIQCtV5AltLK8pR93+X+Dqjim8qupgQ9lwxSmYpuyLDRCjAIgdXR7kH0RsfLwydZFfuHczZpeCfYyzET0LYuc29xa+oY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUcIVCRA9TVsSAnZWagAA2dcQAJlgXspeCdlpcVSnY2R9\nMnllo/+40BSkz9WLWvITKJ+vuQ63cmbc0/R1jyN4GHGxLPDxGxnRJkZJzgv3\nanGvSvTVKRTYWuqCgCkUQsA/tQc2R5wP38rgeH5VJ99idZ4peF/vboeCY9OQ\nYoGApuHkVD6qwJk/es4ZG4MF/Ff6HBnbhawP+Pu9cJgSx4OzTxFMg79Ra7Ma\nYlNCWk1ig+iFV3HW4Ek/U7AHfruSiL4/+9b8mRprpxPn34gjCKNXIvhE6cO0\nxxnhFmqGlwdNDSdIqvmgFIrfYNk/N4+PcHHriW9DatYBARqAwf6mCMOmdwN6\nzg5MuZTyiYvtamJgCYyS7iOWtfGayhlg6lAQB7siRA/4/WZ5K78AtGlZcPYL\nFbEOzKT7ooWzBsAV4dKab/OiuG0/nUhE+DfqpeX8yJ5RCYnfj/I2GscG6FFs\nXXlWQkKspniEzKo9/auKrhGuLDW7lPUSVMK0JrGrle1k7wZMx0LUuMySPYhw\nDSP8FvffY/LyKhWGz3Q+WryyJ7uyRRGQJoN+n92mSk85CIX+f83o2efIEVIx\njYPG6qDVTt2Pwftps7hg2oTs0897LTCm9oO3skkeICmMNHet92nNIuQhfwC+\n/TpL0q/+4PE1OxWuiHV9JJ41BEn3JzFFRtWN0xIj0wDdKilJ3GeSc9/mWwEl\nR0h1\r\n=IQwX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.3","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.3_1582416404981_0.6081112643446336","host":"s3://npm-registry-packages"}},"3.5.0-beta.4":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c26095fc579ec1ae42c8c21ae5f8e7c89b962842","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.4.tgz","fileCount":12,"integrity":"sha512-Z50j1TVMOF9OQZ53Xwe8kHtD2TKmKfTSxu/RUUrkXQ5jvwBuFFG31rdnIgxiMKGAlX2rjnSq46+VhvSKS6gWJw==","signatures":[{"sig":"MEYCIQCFOGNTBj/rVsvztzkr0MCANLCXRcbTKUUvsF3tITHHzwIhAOADUsa6fjtM++Gmm+W0p6/0cmqjMLEDbXsLMDiKdeov","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUdviCRA9TVsSAnZWagAALt0P/iGIqe2VuaQmyWhxyBrU\ndOP8F2uO7JUnzmVSXz6GD+p+U/qwzzvp64+7Tgo8Hi4LiHq6C072Z/wCMwgZ\nW6hgzHUJAfhYw2T74GvMFmbcuPtXNggNYorJEYSa7fhW16230/2alRq9HFOf\nUvvt/gEAMMy7mt0mt6E4dLbF9O4hnUQPcWH/owNzKhlDdYX5Wm7dFi8SDtod\nDQvHdWBhKUfrVKG/IqeTIXSJUIMKkE40eqD9xSiSTNRzYEP9r78rgyKbdtPh\nYePjxKpSaOjTkx3rSph5jGNiENhBXVkYj+NM+GjDhQWneJGwqYMqOGu46AUN\ninfFpxa+I+zzkwh+U84wP50iO9flbxeP4L6v9EjhY4j9ZsD6l6U5QzTOyg8s\nQGXgLlEbb1KPVMpHhzfovx7agfN47YATaqOJdbKjM8wGe8JublgOthxbFjK3\nLFc2VSu7Y3u9QhI3vDh3mEExRly4qd8gPX56jDw9wBCMUOsCDSgzHhSICKR0\nWV0rk7GzRbDKY3FkJgh36xip75DeYDgsgR+roMbdre6JwjOSWQSgTEIGcSyn\n0uPEE3qWf2L9EJFOSb2cu6Dt2UHQbTHeinB36mLS4UMCicsYGlNu80NY97Qj\nsXJIJ619d3d7L4PootaQN0GgixqD0zmtKVaXOppKiaIfSicuZfL1KmPKhsqR\n15Q7\r\n=vBPD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.4","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.4_1582423010168_0.15301260264480865","host":"s3://npm-registry-packages"}},"3.5.0-beta.5":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.5","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"55b085f5709f858f40db5da38c88e1d88692b323","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.5.tgz","fileCount":12,"integrity":"sha512-2NMC9X1R5kYeopOWJw0BUkj56lnWzMI+oMWyXdd3YNh5rQyv8kqgVkaKzSXZ6fh1oAoFyHWfLbMPYYUIskRNNA==","signatures":[{"sig":"MEYCIQCAJEvMzbaOwOtIjP467e5dDnjxdje9qzUfrU0nJYAfOAIhAMXEC033zL+61KgWHOZlIkruCjqEFYbFRoyZQdtImguc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUezrCRA9TVsSAnZWagAAzzUP/2+7V2HKua4gAqV4GXiW\nvdzbF/pSSB4rFl2Xrz/iDYwsSYyltwsz6SVffMCCOb2GtRn3f55HvzlYx8rZ\n7XUlhTDI66h04Hw/9QIll5Pw9d88kxDG3gwMBw1RVxih2nKA9/z0myHUcE32\nw0jq0bhm7Pz7l8xAeecGgretl/7k6WBNoy84sZCZuw27HbTiKCQ2tW8pBqz8\n/MoZf/G2E2E/bO/UoOxcyhXUyNTozmAKEkt6xwVcQRRvbBWAP2uVTGvzRc8R\ngjGfiKNPFfghdp3szh7Rhhlhs2IDEE3EukAWLjvh5YKOeN3tldt7UGotFbua\nKdc8hR+6DlJAfAATzsnxjUBVYYcdmtlXP8fVKroOTW5iRS8zU0tb3m/Hvs+a\npza1Ze7dQlA5I0eOPxq5OXpI2Zmprapf3708hC6isKc7X9eAzvIAqTWSBgJE\npRI/+lnTtcz1ZA1IQLfJAy970mfnL6plFCNsw5Sz9YvTM+PiY1lg9SawW4xF\nOcTY5Lk5Gs8kUP1XLmHNA7eenoIwBuCH3tapQaqXzCbYN8DUiysrOcr8VcNa\nZGyA49RDc1o294UcXCSsTTyxv0zfkB2M5WOIokzoN2Y7CdFiknQAStqVG2+N\nvfKlqWUjSHpVZHWP7jqvlruGmP64ejkkg/tR7m5ubhwgLuCOOYv8p5aWIx5T\nliJM\r\n=Pc7r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.5","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.5_1582427371230_0.042580498829775104","host":"s3://npm-registry-packages"}},"3.5.0-beta.6":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.6","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.6","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"aeb3964ca367afdd7146cdf97748225f2c445f6b","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.6.tgz","fileCount":12,"integrity":"sha512-ZrWiJqWFT3jmcqN2/sFBLe7biK3QNNHahgHklsOC2UFqmzdVLuCbGoUgBji5wBh9/UpvHhlmVLjZB2ertfyfZw==","signatures":[{"sig":"MEUCIF90Amv+RLGtV7cm1XB+TPu+nvNmR9d76ztl2rxk+mjaAiEA4WYKqEK84HyKW6FkVquMZKvaDGbw7U6uARPj4vX0nQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUe65CRA9TVsSAnZWagAAJ/QP/2Wm+QKJLHs88UeDXd9i\nONKtyisIG4LS1JBVWaM7G+1+WDXaYMqXIUxgtxDJJtwZl8kK5VAz1aVT/CDg\nvXEy87XFdcv8iAlWHvBsituhGG3M3JMMrrm7mMvKsd/hNczJulRF9lTV+kVj\nVc3tc5rZZHwC2h/reVHP6NyvdJ9NUsJElCASt3HnCOtImmFjGPedo6NSanMP\npsedy5WPo89WgS+6a4DUlKva/IWuixq/s3nG2DWrxjeIkSyHDprT44s3v+mj\nvCN9Qp8RyKgcdPYVzxaVJS7B87k1pf0GikHvLI90jaKJpW4U0Bu/inFDqszk\nAUKm5bFyPagYg4fcC6GXN+uIhVS9AMQdCaBZ3l2EVd84TXDaGLru8bit6yxG\neFyTfBnlwNm2bk6v/xSX9koiBMRoWWq7JhEtvnOVU7tIIJBfh6gprw44WRbJ\nMZdejn0Ng/fCav4u6AjyLVFrJDdc/DxJEL/t+ToRgrqDkmNOhO4k07beajNP\n+unLTeNiJ+m2xEgrDofW1o+lVKDX6SVnYS/T6+3OINbW1XhKzo/Iul5MU+HT\nRT7bzFwOwGOW0UFAQYgkzronFytO7mWdP6GcRLys1cvTTq3xyhvcWlzkfuXO\n8DzuikYOZlVhS7Rq2z38aF9yCN9R/ncPnXtsB9QhIfmyigq4HpXhkwKZYGd3\nKKod\r\n=Id+b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.6","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.6_1582427832774_0.6134606223608698","host":"s3://npm-registry-packages"}},"3.5.0-beta.7":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.7","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.7","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"3e6cf52244817dc03dcc29221ce21f5b0f7ab827","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.7.tgz","fileCount":12,"integrity":"sha512-+l5rfcvSZxfneK/cm91pYdqB02DgUqRvX0f4wRXHdXyWD8gf0M3qTpZNWsUo3PeU7nKwzx8IeU1rMmAG5s2RMA==","signatures":[{"sig":"MEQCIDoSM4jqnuhojZkn4j94Mf0bIrEot8UjAHxPpW4Rj5cNAiBoOY6k/8jJ512JlBpVS2wj29jroVtKy2fSa7wpJUjATg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUgfpCRA9TVsSAnZWagAA+XoP/iITzd2TYT+d4sRSV50X\nIbQCD/WEgz/x0Nn4WtwLHOuYnpKN7jeQcyI41S3womyZ6aC+g4wlB6UYdm56\npgddmuUCEQZVOMTGIZQPlMPVjAYBMvxfL7sz3SNK8R3tA/MeS1QHFGfxNsiZ\nWX363D1J4S61Vv4Yr8dTGEMIzCS9DtGRqUDR1gURfEQGCED1LlY5KQmPGiGu\nxGCkOc9kyBQQBaf0FNugUSOsYGXGtd4D0sXcrSb94ulnC1P/hhswyiJRsKV6\npSjjVDusDagJ0ugale6yfpUpdpNdyuD0oYRVSQWwjPIo/s+8KNidD4im3r1N\n/5ebeoUBjmk+VjN0cpx5mMzQINbUfFwVW9AsUF+jqxY139jJpyJ9q0Tjchdm\nuCW9nyZ5IbPyeb4XgT7QOPnRpOufa2kLWqyLvOjgxKBNYw3xuhgUQ/LE5LfB\nozAVl0H2aF2DmGb1LDeHZOsSWKDWjacEcbAviGf4tlVg6mVybrCeTcAeThpm\nLhKPArIAc6HtjNJLOpcugFz8lHi7FUReEHFdVocpa61dI2snx4Lv6AShRIlc\n+LtY3g/II+mDsFtJ/3NsRlw35Yx3bnB9MsoLHFUpZscBz8TID6UVIUb3wGEz\nTIHArkoKjq4PUs5/2GJ35lVOyCvXRbi5ydnKAwsBWQ/69dIC8gGOXdL9M3/s\noqlQ\r\n=rXv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.7","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.7_1582434281535_0.3045339526024782","host":"s3://npm-registry-packages"}},"3.5.0-beta.8":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.8","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.8","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"969ca7fee59d6b4e0373be97a99d2bbd1ecf4e04","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.8.tgz","fileCount":12,"integrity":"sha512-/frSJB1BeBFNmGjSvdFkHUmIN/fkvSA0IjCXRZpuHq6S16fKLD7ZfN/CWwbXcLBTHyeppkFtcfLsaGGqHvkbaA==","signatures":[{"sig":"MEUCIGGjW4Eho23pc3wektU7hABVvsaxIDaREwUDt34VfJOmAiEA9DiIs41ttXEkZby7zMQ+i+KEGcASHPrzLKPnLShTwIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUgi9CRA9TVsSAnZWagAAMGsP+wT/HtfxRLlFgds0VehU\nUduFFjApsP0wN2+irU4YTqLB/yf9LTsVyGRh0vCioYR4uPljsZQgqtMIidSE\nufls8npNfL7FZ1bYqr/Mb5fCFVIyVSqI6yNYUJmc6sH/gDE76oJlBP3UeBlI\nsxyozUhNkUg1DaO3JT2TPc8TVhMyQHu8TCcCx5tj/X8Jz+svQHTI/VS8/44M\nUoguc1aKJCpXDTl1nJl+S5HecWL0noXfFHXmzu+6DviePKOLr7hu3dAHArF3\nfj52YSzAYPLPK0QW0xZlxBuMGnMq7gYk6RRIMnNsTZqpUB36IzSiV9eg6zOS\nk15wRH6Sf9KrkSij0YheZJe9D90j6RU/esee4WPFDcbi6gmIab91FJzKbYMb\npn0oQ96jHu5guVCkCo9bbBw0axj5U52SEgvS3bCjT4xuDuLfVf0r+4i5tYMp\nOwsJ4PHd+UzribjLOh1/vhp7nX5VtZvx1pi9/ID0n2uCYGaS7aHTkc0ZD9g1\nMlXQjW7eFth/54RpcZXmCYG1GKtGe9B3Gx/eN/5wFIKU34UPfOgIoUKfiJWX\nRGBRPNsXTPWWwggTXQVaXA2RHnt3FE0J87zypHRdSlQq3GLoK91RUSm+D9fK\njFM+qikLY9lFuJF2lwGOz2i8hxb26ejNHCeMaDJiKBOljJ3Vy/IwGtiYOLCR\n3dRG\r\n=HMRs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.8","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.8_1582434492867_0.46382583192452187","host":"s3://npm-registry-packages"}},"3.5.0-beta.9":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.9","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"34c66055bf94f0a67bb9b8a93dacddc9268e24e2","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.9.tgz","fileCount":12,"integrity":"sha512-OAHppUVTpoBDOlg7uDfeu6+LIwdEpC713W+UQZzgGpOdOBG1ORzsTgCoBb3uczw3oqpLCRub3mJd/0Ltf7TG9A==","signatures":[{"sig":"MEUCIG0gmuNtkXaF2bKO4pt7emnsznslRV498NpujNfJgzSnAiEAoAP6fC6wxNTrIdvMHyM0Pudts78fLiruLtVEPwhxCPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUg5vCRA9TVsSAnZWagAAAyQP/2NXl6m5rxxIyszgg+A7\ncrNdiuxJ2dVk5RGHAVgQ8daX71dasve2X54+SY7kr1PW3XfQ8d601eDMI6G6\nvfsFTPlNvthkH+A2+LvXJiMm7gjN8Dm7hCzAIqJE/TKQpLdVr0xX1XNx9m42\nF3ZtACPyhL3YRkVLyKL5g4gM7pM6Cjj3+oBfP641OXdAXyTKHp0jMmYzfcWf\nbBTIM+b9u698ibwoInL5ktmiBSDMttELmJXioGyTZGwMZv8LexsOqKnefayh\nBV7+/I6mz6ursPlxwSwwAlVFU3X4FPpiLHqyvfwYy8OSGoUZZ6K8JSMp6fiY\n3Wiah+iCMlgdX6otHyhNZr0SP8bjFrmHjS0AgOD9ZEcOnFV7TEmBz/SvJU0a\nm6xbMH97tNOCNObQ8zr/FHTDw0Uy6kMFoVQ0LBHkjv+o1U6pZYcBy/ZHV+YK\nEliv4DheFD37BjDs8UyR7yRsaTmbhgJNc+dyf1mNgLZVnCra6g9+Ke9WDUgq\nF5uo//M8PKT+42vQaOezPFnuIIM44oKto2uGLH+2Nai6YxfuJ/OPRhV0r3k9\nG4Lch+eAOf9GLeyj2ES2YhEBim+KLDhEtw8kFW4aB1qYFiI2itxD2BfZWYYz\nILR75f/6vsFcyPDiGgCbVBH7Aas6QY/EK6/F4PSRV2cs5SAMpguGa2zmZ6VW\nMWje\r\n=5aUk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.9","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.9_1582435951316_0.43746840715685864","host":"s3://npm-registry-packages"}},"3.5.0-beta.10":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.10","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.10","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7dbd4debab929c916a5fa22dce5f0a6ec59de024","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.10.tgz","fileCount":12,"integrity":"sha512-t4ROlx1FuFZCuCGWczueDB2qhTYnKkEvadhJLRtmTpCaqcZxB3KjcGRrzlp4JnJ1vVNzk+JLZkOG0DWM8CwjBg==","signatures":[{"sig":"MEUCIA2FU4p+Wsv3jhuqTW43bm7WwOXk0dLTNfmFIjO5eFvCAiEA0tv2k+nsxIayhM6kcfcCupyPoW2o/WR2ZBEkxwtdzYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUhKCCRA9TVsSAnZWagAAxRgP/RMD6ne+ClkyCBgOHPk7\nfO8nz770u5QCEtr3hfZ7G2omSzf2GJeWR+YmkQrmcMcRLGFl74ml6HqMBWsq\nKusBFH/KKdAk7U6qDP1mW6Rkd27LVOvwQilfnl0KZEDArY29MckaY9UUD3mj\n0GY4oNXdAjU0fuvZDsjSCKu8zjDV/of/0g04Ox3SeykdWQIMamuvp7oOA9pe\neLnost7r9G/h4GQ1huQc0ciEES309cSxRt3tSOCkbtmOaKkSIWZgHHYcsw6d\nQTYzFMn544gLLJCsvOdvaMbP5j5CXAuNDHKn42DrS9nEb7/HrV//Hh9DxjwF\n9q8GIX6E445/qmNdB4VfG185ALaf2/KyD3PslZQ04FzWBSZTAtfg85++64Ry\n+rgReS2Un9gNF9kBBQ6w5EdxpEFaJlHPV9ASH+691LnxBEtmA8SlqHCPEu9c\nMN6s9U0twQNJ+6JtC6JKXie9+EZGTh3aXpXhJxlyajVnbviSV6sEFeClLDVm\nmjrRedYCanN4ncZYTYh/mh57YU5KfjOifYBPhhYGilywq+uZZq4zYfEYLqKg\ngSkK6l0A0xpblYgIWmjrpFZPHW8ZhTbfV5fxHCFrQVQmVlR9yqG0vieErAN1\nFgVQYQ4Cci1cd4mm5WYaYH1+4XMsd7cK2IuCH6yO0ukSSmKhDZtYOyMNf6tL\nLyIN\r\n=Wf5c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.10","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.10_1582436994092_0.9577296079406044","host":"s3://npm-registry-packages"}},"3.5.0-beta.11":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.11","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"28843b68e8153b0c345152f06b4c60f52e6e605f","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.11.tgz","fileCount":12,"integrity":"sha512-MUYABjkUQGkPtYlQYbL0nKvdZWK1iZDaZgVq3OtPWveFwj20hGTwTemwaz5NkVYlSGUYaP9OypLuZO7ZekGkxg==","signatures":[{"sig":"MEUCIFY0uwfxbHxFSo5tREsJV6PiRI4dscHadZ9IJuFdPUIVAiEA0fEq1YGpseoREMa79KhNKBfhIhIUzY6MmrRxmEsTGak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUiuJCRA9TVsSAnZWagAAzK8P/0Iaio4p8HnyIdMF8014\nB1fLeUj2YK6x0COqIrGA8fTMULK/aX645z7QhTOqxoWAGmI6I2INq+Zu45r5\nP5dAleUMFWN2CsINI7Q+zVLog+0znUT2Go0B6MR4KuN0KVsWIyHHEPmJhEck\n4g+akOGziWNc1YS23MOY43QfXGEjJoFm7OKcDGdD5SicYr8oKvvFFv4QLV4D\noPkqwk+GdhgfXi4feveOQ5Q5sgimS2Y4OGii2Papt0cSoo6dqecHyy1b1oqp\nivQmdsHE/M+GRPPim3haaWFK510l0skY9/AvCicCcqppJzQAzXzCcKdMHPy2\nlE7xEx244tS5q5Vc85uZ8c6RkS4OjzMVZ3Vn5QLeenZ0xqx023eQb8H0/CyL\nbmczRe6GYf/DiW6AO9C148LQ6ZIqc0jNSZl0NSpuLfyyO5QMvTiIWNGsJvCF\n1cLQ/YpVIEU/Tbh5tjEmON8bmKj0vbg2int8jMEtssYXgrLEq0qylNe5kYSJ\n/pCPl7tAWFI8+uCkECEX6IsdNo+YjiyB0mxlLQ2QkSi00x3OyOXOOCgcmob4\n17ZM1EpEG7oIzFjoYFV0N2HPvzZAz/mEeUTi2+VqQ972EBLDIQXWE1JdwmP6\nU7bNL7SorI8o9u/oDq4RMT0m+0TFniBon3dtjK1e/uplXjN6eKw9jwNvIELf\nfKUR\r\n=i8N/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.11","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.11_1582443400967_0.36500272526685285","host":"s3://npm-registry-packages"}},"3.5.0-beta.12":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.12","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.12","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0581ae1a104886b67e8cf86d8a5b95cd48c1aa76","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.12.tgz","fileCount":12,"integrity":"sha512-eZutnr2UYiBGzb5rF6mfjYMOnHiSF8MX+8y4UT4g4IRia0NgBW0+LIT5DOAdIfY8MYSdB0xcNpxjvLPs/MGoaA==","signatures":[{"sig":"MEYCIQCRrdt2dOZO9bpEfclVrdnOoJNv6WhCWQMpiZSpZG+jjAIhAOxW/UGi6cNTCBUvmrBivIk3YWXwY0XA4rT0U1hkC4K7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUj71CRA9TVsSAnZWagAA16oP/1x9196uG+l9/AAGTBSn\njdi7sNRBBcyerGRRlGzrZcdE+PsC8fPQT674u4627E4gbgOVlDbBPRm1HUEH\nm1Go4BCzcUx80xOLHyaz7vwMBR3JqCNyfYk7XR3rCwm9a3Xb+YU4DJqDAMCZ\nFGSCsixOTeONeahSoqVr+1f1DB8Z/Z3GVzF+o8RSU7BvaakFc7WrsPUZA91C\n3XVui7hWOynrUOLCy4Ht1ASbG/F2oVirjdOnnqgKJ3ZZodI+3wYe45puHnef\nDBufx6xgjgHt7hMvKUeyUlZr6mFG+uh+MQQK9KWYgR5agpibHB4Zj90/qggp\nzCLdwjJFfBHmSnIO6kYDxki54MfNxMhPyQRtekSm+esX1TNFu7NHBpxMaWtB\nzXYmL07D0LY+SQL5cXkQwWsucKmvXySZuFo0HxX0xcVURb2JdWSJ3VpK+wDm\nLvCDtOsmXX1y+S9/cOtHtanEphE1NKY0ZC3aK3x8cWQ/UcPEqnn65LldO5Ef\nRQYWNRN00UsFAvNOGEYatZ/u1ipNc6aDS6jAWjc40ckLVM7SE36EpAbS46cy\neMfK1eYhhvVpcyJLovM1nn+6gqP/adZd+GR0FzRURMA5Id6tiw5cyCsSnoSf\nUqpjR54y3qsZj/Q75egZOfuU6FcZ+mhkKRaBC0RJccw+cP1fqTOGFjjrhWv1\nYYFN\r\n=Km3o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.12","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.12_1582448373031_0.4441996453556698","host":"s3://npm-registry-packages"}},"3.5.0-beta.13":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.13","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e4eff37db1c79b9a1e9cb0b988bd9d1125e63324","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.13.tgz","fileCount":12,"integrity":"sha512-8XUQISR8cj1PfJF13Rk8/FW9kGq3ldhinL/8nNFQDIEdcBQpnWg4qUN0zZaXUwAskNW1/2RCRQ1H6JOrUfxoew==","signatures":[{"sig":"MEUCIQDK14OE21hQOc+6ARCfVX/Bo0doY2UzYx6mvO9R/sPfFgIgYpKjE+UazW6GUMOtWS4F5w2Gy64Sq4uOacWyZaUYwgE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUj9zCRA9TVsSAnZWagAA9nMP/A4GTvosOmINLPpXHfMl\nblgRJzFHZ49lcfk7WhD+WYOKOjRtfDT+4rDW6CRRhdqDOrLJmp46D5CQKfmp\nEDqgcnXbeY4pYXYo2UQfb4Ahnr2Jis8/YfEjFWVd2qNvtH4EfDCZ0wnYzG9s\nZpJK8HnSQrhrvzkfo4E9M2YG3xLH9B1xyXlCKAEre3RdWyWJqkyELrCcJSKt\nreTHiL5XkeocYjbPjrFNFs+FqMGKe2uDuLxQuvDWzbM3C0ynKbv3+ksgCMNk\n7ZQuAJ+6PD5BDDPWn+tjHQffq65JaqyU3m4o9b2GiF+DV5vt+14WYc2tPJGA\nipVodch1N0TAvOipHWYz+sheuwxk+PlRev7jWAmwqpVQvOHuM2tUaGJtNK1G\n+WuB10cdxMYye/gPIBmTcDy3a+OMOFGUxHpEYOEIqlW8K70kCnpFhHQJVuVc\nllWZyQCeeHgzZBggo06CizgTsuaWMN6gR4Z2YVemukVT4B9kZXXUsVWjlFwK\nPgfULrkXfHTbkABc1wEwr2yg0k/fD0LLZqPgN8IB/5kSd5vQNAb5qglqhgtr\n785X1O8SuC5bP3ay5qfaCT+m4ER29A4dqaiukP1tGFsq2meqb0kjL4H5nOnI\nTU8uPfBd02tK8csaZv4ErbGuuKk4+Tu80JEXb3JPRWm6ya2nm0m6Djxgl63e\n9wdG\r\n=JULL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.13","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.13_1582448498936_0.8464603384730693","host":"s3://npm-registry-packages"}},"3.5.0-beta.14":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.14","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.14","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1549e3e66dbf114b3b53de85abf58a82c78ac5be","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.14.tgz","fileCount":12,"integrity":"sha512-DRiWbJxtF8FwHg9PTfwggdOZlvMnRwmHbxVDZEyoqZb+NB+db55Xkh7mhamZgCcwaFfXx+ODwPjiobawDwi6Vw==","signatures":[{"sig":"MEQCIBiAxqdNv5HsGzNdeJ2kAuML/9StJgOGz65oJ29JBahYAiACitIMtG7KOQZOUqvuZ25s9sJ/KgSESEqtqwK7AHIfIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUk0MCRA9TVsSAnZWagAA8hQP/iXbQyGX3skxxMYjTO33\njDaXr1Jnc+loQuwmj2eI9gUQ8GTJz0CkmYQruv9pOItkh+1SwuEfsDPbkffd\nFHNYkJGctKl9u450y79TrHB47ykY+KEFT/su2NY12LbHRZerin5EIoDSy5Au\nUI9vyg3F0LyBRUjDTCyBC+MwgiptX25eLm8EJnSXorjo1PrNfLZSRPu9JawY\nJtnE+gEuZRALOnFlURyUReYFSJDLwW24AgLgj9w1ErV/ZiGVy0GoauG/w2fd\n9I+J4vLpf7TFHNljLmxIoMeQqzeLblIzXOOng5txEdZlFf4TRY4dGttqx6wR\no256iQuDnDWEQgunkj39PrQLWKNfHxBKqndrxWJ5FUmdAQOzGqqFa2WOe1Oh\nUsvJIrx+bIJ5Qj5tIh5xxZTQ95M0BIWEkG7OSMdvV8OHmQUSfKiVruRKIrET\n4apEXgCYylF1/WsYYo/JatFDXNxspB7CtCrfrB3GtnvVva0ZNBsR6lzwoaKx\naBg7h533H43/nvWtl2Cns0w0nzI/vhDMu7mHoGR8keNYTZyDzZ1iHCnL2vuw\neTPcjUWbQz0bg6+sYIJlvvS9SIA/b/x8IWwucMx9/luFeu4fe89e4o6Iv881\nJr3Wtt+BlRVVJw6n6PLoxZbD1XAnYq0h++hvEU6wgSDw3gS8K1lW4YKkuL4m\n15pl\r\n=5zBs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.14","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.14_1582451980482_0.6394294481077853","host":"s3://npm-registry-packages"}},"3.5.0-beta.15":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.15","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.15","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a5918f39a67ccab6bf3946439bf525ee617ffe4f","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.15.tgz","fileCount":12,"integrity":"sha512-9/gWA2yyh/5XEDauVgCJ1DwrzVMI6wSvSt82E15xto25c4G0UDbVvh8l7pl7pw3suwmj3RqAlzNjwQtWPFc/fw==","signatures":[{"sig":"MEYCIQCrsq897ABz5KT2nzpF8YoLfNUcqLF1JDf2GHPsMUMQxgIhAMasJ34J8rAiCc8wVy76pfI2qdAzDPCCyHfn54yKVEs9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUmaNCRA9TVsSAnZWagAANp0QAI1Bw6/NDj6UorEKPwGa\nnqtrAm2GrP/PFWyzsMp571xdjn6f6XTSXyB5PqHniCh9olbJF5R5TESYToNo\nNjZTmQM1/uT8CTjM9cZ3eTJzSkT3YxxTJWeOnOIEqsn7C7eD1oHybNifcEzX\nQWAkXp1qXbtV0AG33m09kMIrKXQoIAHAJXIK9pllx/OPhBJpQO3cc3ynNsiA\nKDNfNq0Npv91vMOa1U9LguGzY68/lU0QTZTkhYFUxBjSfryfew1ma1ayAkSc\nPyVDmixSXWw8trYRkNIsPLRqKFktGm4zypytPNfxHvRgtxFdyEr8T0rD3cQC\npnccNNYAapquGwCDxs0J4tug6pAL+mD8w+N0+Jub4/TRoq3/ULLOq+VJe/O5\nuQie8Xv9FkvRkaDjig8RtbXeTArpbcfIgkGKr4cyFhVxooiWrVv0LplSkbA7\n2wmC0yIsohx98TUEVfmCNPD1IFGRqbSzmBVL2WA8AIQw6SgqcyvKuP3f+nFy\n1JG20M2KAhdkyvoL0BKhMA3CWAeaEStO4LdbwKt7f4zdhQ5mmfJWFGZCSK/p\nmI6y06NljANqvzgywa9I/cDSqgrLPH7xoLOF85cTuqNBMh9rvacPR7CEtv/T\nGON8/OtYmgvsJ9sYWxWwIs7zUwyoQi9TjORiehni3Vh7QxYZGDyODrgIhKKS\n8cRG\r\n=21ar\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.15","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.15_1582458509261_0.3520182612394296","host":"s3://npm-registry-packages"}},"3.5.0-beta.16":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.16","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c667a8dc4ec0851fe32f565f5659098d9461cd09","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.16.tgz","fileCount":12,"integrity":"sha512-7nG/e1Jf28V5QZnKTSJ4ANfBT98C9kTQ8py80gJYoKtLWpo6bn1ldcdS8gGPOXJaVWvHHG4xvl3vIDiVamk2PQ==","signatures":[{"sig":"MEYCIQDwCMCxsInpjwejOqU6CwFTczsDNMpZs25vgI4mT1marQIhAL2wwJ4jOQxZ6FvHFFPdgg0/9nSzTyF+bXVLZVssEeh7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUmjMCRA9TVsSAnZWagAAkbkP/3BZuHLI3tp1k8SvRe5j\nINgUvyfIbK5//o4r4FPseSRY4946G0HjYrDYy8BGMtf12YnYsTXfnylGRawY\nIkBV0GMgB96ZKom+XdPd8WM9ZsQqTG0S5OBSewF+jVEFb3XIHLkIRycRq3Xd\nVcej1BxFqOMVFOCJJXRiZ8THw1pEWU39DJoaIM26NAH9TcBZTWvVu5/cQMjI\nLSpjIv0axMswBEvniishbcx792muJSOsI9j/mzZcBA57SYcqA4Wq/shxsWDm\nC6dbA/LCuxJxQQKbCc2++5Px/lAPwm8HQLzo6oGvQfipuiZpMASO0x4n+KHV\nIlzga288Z4GZJfbV7gainGNuAwezbBf8Y8ummC754UMCAS3+C2GpYAxQTNqn\n2BpZ8mGOGcr0FVuc0Lfi3J6DTlJpvoF3zjeWfXvsD3QSA/1G7mPWmWgV3+oV\nfxq2Q+ZNV85TcV6toGxNoE+TfEqaYaEU9VW2XpBTnmy2gdyVOD/13cB9SQJv\npLQJsOkufd8zYzw0tdvoFFtDfjFg8LjM5kYmvxQYVsnQ5R06+lIq7MwqAaEQ\nIMaD2QHl0mfT03JoER5o2iQlvwD6+jLnF+4WydlSrLULWhOcUOhG1v4y19Ae\nrqYhJ0ULdJ9upMWLhcyLCiyF7528GOnWrD5VGjyyzPd0nk3JVnQxrj+SE5Xx\nCStQ\r\n=G5JZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.16","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.16_1582459084081_0.4477837475555084","host":"s3://npm-registry-packages"}},"3.5.0-beta.17":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.17","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.17","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"18a412db90b31fa48997a7c8d6060a539232a12c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.17.tgz","fileCount":12,"integrity":"sha512-Ql1UPtUh/V1U2J07R73dwiH6EpaeqdHJbv+0fYmQeJvEHVztoygLi9F7AhnnqH6zEKELe2Fbbtyv03ueKzoeeQ==","signatures":[{"sig":"MEUCIG3ObPDqE60v5n35ygXJlgfoWUGNdsQq2slmZ4KHiSqtAiEApclbS9M6OzI18HNQWzUkWd+FHFMp/A9T2Dxp4I7hTXs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUmyFCRA9TVsSAnZWagAANqUP/iNXZ5dHSdbJ3oKEW9No\nQ40ucidNJFyEwMFWnNfLM84o6NN0/+yDPSfsCpnFh1IyF0V6yVOcD7siJp7+\n1fhBcWL0gjpcQKxCKTys5ZWdo/CoEJTReqnduS/mhs7SO9Z/o2XhKk8hGwxg\nH0XWxr4wfH+V8L5fMF2x2TdCIL01eSRNaR8wRSElBEpX1iCUYhtlPxc6NQ8+\nTPLcfQzbIztXjpIdXO5MWzRMUXmSp/myLWQESrxMSfaHwS8OpxQj+WSntDKX\nk7FJ4MZqfTMP3V2+MBhl/+Lvua5N/m+Z3praFml+EIwOLGgn9cmxRU4+xN24\nC4vUxfKSj0wUUNH/jHY6UyABljm3KREQZOW5Xuw+f+7vwUx7ZkFNgU660x6v\npIN+IHQsZikDBQIfWRIiAwuvmyqtvEDLLWkP4u5zfjm/AiJC6tN27ARCDQts\nyLwKZ/udVlVDATCxatGJhgdrC2L++5wsK2Iz9ApjlS25/oKYmujtqCn7aFgs\na/+w8DYaOx7r4mIFwyTbmBtgySJloBk8xoDytRyThIqp5992reJR8BYPh7VZ\nT8u3wFyFfpuGVeQvM6NoAwqaefhn1fKO5oZAA12NJnfY1NCeZs704vzAd8RY\nPiDQ0Vt1bPbAP1faDs3VbdU+kBRWP6L/4uNMRzTN2M0tVyeEdbsbP+yDJctI\n/bhY\r\n=BeZr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.17","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.17_1582460036481_0.9515448997246156","host":"s3://npm-registry-packages"}},"3.5.0-beta.18":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.18","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.18","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8bac0f3a3525b04b147a65ea263325b0af77c2c8","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.18.tgz","fileCount":12,"integrity":"sha512-UGQqcwgyUEc5eZ1BUN9wiSkQFPbSJOAay74D8EWbQqtepBGpa/4hd5hUYLTSTwEIdds7z/X3o1SkSVITiKYAuw==","signatures":[{"sig":"MEUCIDVduhED+7E7syqh/gqxaxPncAbmg/MWiKBt8sjA2KsmAiEApMcPnjny9biZIoC7dbdoAnlT3B8o+3iAQc0jffRJ3EA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVJuECRA9TVsSAnZWagAAMXoQAJTMYjWDfjArYc9mTi8j\nwdAewNmEQDDZu0Sp2Tgz1T/xdmW9DBJfYbcVf4cum4YqqZOuMxt+zG3M/EVS\nsGaj8CPL1AsoAan2CKlRnhk5wGi5Wr1EdqiLSrdHKJkab0ym2Jfw6t9mk2QB\n+FSbZ26sci2Uwa0wyeLUC46kQd9oX/buqCQJh/ntTxfmH4oAuv2TgpZ5wguK\nBA+P6OIPgg/TJTzOsSfXTYiqj/ikYcvU3nSYwfr/LwAh6evvLgoxkQoTTuYS\nFAFJzj2O+29buRn7qhpeGPsp/q1xFRT0wY+eNfUqlURgo6a5i5A8lbno1fOc\nd1I1EvjS8DaB0uOT2ENyLt3oUMdia54bvvi/ZwwW7fX5uoBXq/MpSYSCxQzN\nAf8gbQnHTiRtcplhyErzeeA5Q82zqF1xlc8DJuNymFxVIBnFowJ8k4UDNA62\nEvmwxde/lk6P1O+WsfwngkrwP1gASUeLi6k4R+YDVWlUqWQJwU7seYhwo4ew\nRalnQi5j45GksCVnOMz/OKdVkMao1wM25WQIHt0sccwOl24nwJoyHux9KCpE\n7oCxudnDwvkICx6QAPZVoSmyK7/7/QLePKtFj1usmBqzWB1ELH51Ee5YNJBM\nz0eawxNtIwN/HEtzNXPG7+4YawYeYCTqkKHvMtIkJWeJ+FTVtwprVaxX5skT\nScRa\r\n=+1HE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.18","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.18_1582603140264_0.7012238363248895","host":"s3://npm-registry-packages"}},"3.5.0-beta.19":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.19","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.19","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ea9abf9c7e2037b4649456f9c089a8d499d72b8e","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.19.tgz","fileCount":12,"integrity":"sha512-4wVbXxG23pkt6zeD0f1YT7rEVCyA+IzXFmmkJCAqLYcQs3d4wXbTWFACdvWGO6DDfMYM7sXuCdiG/n+A4ax1qA==","signatures":[{"sig":"MEUCIFcclIfOafaNiopxKvMkO/j1mT/Kpa6o7taSp8/nW4K5AiEA6FhEmb4H6UJsGWwLHTeXT3GO/2nxpoOuo0UoJQ6aKco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVbQ0CRA9TVsSAnZWagAAgFkP/i17sphiV+Y+NRM1yBzz\n7OkxlBfePPvZYyOUbZyRCC3oqgNjrw3HclTGy1gCUEfjI8rXFkUShe+La/Cb\nVC5Gq2zbu/FB1tT4owE2I6IZqgjs1zPWc5cVbYREuU+KJalKABS9+0KCfV29\nC9gJSnK3w35FCWXTQ7+FxIzyax7KdDk1wQI7L76gyMJ1UGtIJqU3xcaaD6Hw\nM2moeU87F3DJcp4/Q/wG2GQl7aEBiUMp79UJD2gWfJOTAvVNj2FJIFAWRlN5\nM14bafOg9a8lA7MYzxI4Gy1j73qlNmQprBwirT0XqloTL9AtLAaI2vi2m7oz\nlc3grKgY5iawTSrrNKOomcwMaQWcKhYnNpt1zhmEXYnS2VIScoUyFfj4B/v5\ntg7w/e+yP1M6fD4TA7w24z8GbyPF3fdsKg5+03f08PBR8iUmMqiNn/uNQExf\ntFHn9TxFo8WijKwa3wNBIYHmje1imactLrg4migtRDppR1Pra4fpGTcjFBh3\nvCPRncuE+lfJ96340kNiMqVm5fDEvG3SvaHmOcX123CZX2Hn+BjtqU2IdBhG\n8g2pA5Sm854XUV15Ta7k6NIhabY7Xq+NzBR+oJn6xUwX3XNseofSIchr0XQz\nM7sCtvInmsoKiRC+y0X2dL5mM+p0IUpcB5Fijaf4909uVDJAiJAOvHxL/pB1\nmhRc\r\n=1NyR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.19","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.19_1582674995847_0.34472700209161466","host":"s3://npm-registry-packages"}},"3.5.0-beta.20":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.20","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.20","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8d09e6f895fae01a2ada7a91f431be55379e7d3b","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.20.tgz","fileCount":12,"integrity":"sha512-eGP9JmGjkxeUFJ+pQXE8XpGr+aaHcQer/6mzqymk3Fp8FU/Y/8P2cVNzPtRhh+eLK6A4/bqjDIOpf1YXfBlnWg==","signatures":[{"sig":"MEUCIGH1roSYe9ERnAPZkwtAACU1VZ98tsjuqPoVKmldXs1SAiEAsapteqMubnH0N8j5KQB4CNC1O7z9Q/YWLtiIxqQTx+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZUgCRA9TVsSAnZWagAAzJsP/0a2JpkDqA70Wu16NdJp\n059ckUm9OPD8y2Nf840sBMwUppzs2ycjk+/xm0CPx93+Lr6MlCs6WfxW7GVZ\nBzSgD0JtUmKkUsT+IxrwaUbIJFBVJkVPRNiQPy32ukHJY3vVdxrJMHdK5j8K\nQKFAcEB5vpSNDRscLZ3suhzgAJMKwaEmEykwMB0Blf/Et0CNEl/iqFRj65ZP\nWyq7bpCAbiOKro+nB9EZ2QyUZJGnUS7m91FmEBArgmXuFrpFW8VlQea58mIQ\nu7yJlK5FNX215fRIG+hdyzOMO1ODooRdnfoGKozmdR8k+rgXHU0eJ0n4opP2\n2+Kr3ZPXRfpac4azSsE2P9CwKxzobI/MzJYCvG5zy3SykitbBb1i8M1EEdUu\nzW3rSqBnZwuly5VOP+eVaI2BJB8S5EeF377Io+A4xL+iVyhJ0ElVh3nukx1F\nVa9gF0zu9sLlx7jDNDhh6+to+h6j/RBKqhy9iLL0/4w4osj3rB6W6xleehQr\nOsmpZzo0UlEStzz1rXWYmaX1m4dUpFhRBRl4RBkJ6rSEgsnbVdkjDR0Ou8ui\ntvc9abRZvJ3jFxOYf2PZbivymO7LUmlR/he2aFEpoUBiXRox+0w5jc0NjrUS\n9ZeAB6M6q87d9+x7QM92ltwvmmgUqsuTmsLeP7e390YZ48V67Xxs8qpoJd1I\nzgGx\r\n=G5ok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.20","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.20_1583191327966_0.12611775012840765","host":"s3://npm-registry-packages"}},"3.5.0-beta.21":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.21","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6925014848ca6c201985ee3c62f8c041e2d74f03","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.21.tgz","fileCount":12,"integrity":"sha512-v/+WVHj9Ebfd43DlTkFB+cWXZTExNGMv5S+LdepojBot9AcvnkDSz6YX6Ed/zlmuEBUoWjtVU9KzLk8l45T0Lg==","signatures":[{"sig":"MEYCIQCzJAGKdlxbKYkCibATxLDnZ+Rh49m9Z7YPMLrsEVSCUgIhAI8tW3x0Ly6RRjDPfGKNxYA/w/u7SBK33mrte/XEOsxO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZYpCRA9TVsSAnZWagAA9/AP/RrYjlIkJLzELRJX8M7w\nOju32xcmS0z5RvNphzX95DZpOpnEkpr8RVKFUnb9ZKCVzA79WUzxejrYYDwY\nvXy5iq+pl7rq4OA4HSl83FUsUN0bVs0R23P1a0n56N5tYHmIFv+V4urZUVMB\nOoiUDQfBCgX8AAPlGJzWM4xxOd+dDsh59gTO3l2MMVDD9CDUf5vBIcOR/DFB\nmxxUDkIhd/7d84pGd0r3GBZVTghk+/bBNB8rthSAyT6zROCH95Xi4vzTKvZJ\nh5IQ1DEk2HY3Euu2Lbq115oR/Cj0if/n2vJTTkpQp7W+UnJOIyd9SmUE3W1a\nIL/Pziov43TdYcImEBTRGWs+FmspTPNtzQn2u6UbkvLraTWDqn9zdyjtLCk1\nITmgKZcrO8rYQ5k9s/T/rGV2ksAfUGJCCijbzblqkiDZVRgXvR2I5wfKTPx9\nvV6ydLEzU0M6pDuIk9oGpGFtwM1cwAD9ROqnN3593OLdbm7UbBPjV+aXIzcd\nqaNxoYmgUHoahxImtcZW3N93oUNPdl52G0iCOwe2tgjBQTdtoaM4ejLETB9h\nH+hoDiBY+5Hz1D6dV/ybnZBcmJSNl5z78JttyF2E7ZPOnPo33o9HHmAXR9Uv\nuJpkEYHTgHKuSf90IX/qmEKLMmSiZ0zc/IpccUbfXcP4jso/f+vJyfn0EsN1\neB1f\r\n=IfX1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.21","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.21_1583191593521_0.23343288222807357","host":"s3://npm-registry-packages"}},"3.5.0-beta.22":{"name":"@aofl/templating-plugin","version":"3.5.0-beta.22","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0-beta.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f3857710ba981274b0acabdc29459f4644b3530c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0-beta.22.tgz","fileCount":12,"integrity":"sha512-8mK7aUQ+DGlSKZXTqesAXTSE61uFgiHyV9H6p9Zrzg861Ud0xUrK7eKyTDOR13vYaAB+2p9eDuPxbcqvK5dFXg==","signatures":[{"sig":"MEYCIQChB5Jg9wl5YT+zHGR3lUO1IJVaEmhzuH1WUbndqnhB0AIhALNM0zqrLBR0kZE96+Zdz6RycHu4nd1IABp9pqLx1tll","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZm6CRA9TVsSAnZWagAAbiQP/2ck09xVDtBED1Dnwf0r\n+zp8lSldDBP5mUHDP8/n6UGoSVAAWgRFLC35JxQVrYtJNS6fSqcoB6CmPKZj\nGBFQ4Pojbog1P+EEkeXXqETVh5i0Ujk4njGI8azjaJOiTzYWpQUjh1ZzGlhd\nFLcTAfAkFLVYABGqi5IreChNS2OrUVsYbusH7jSIWr6yT2mN7MHSrvPUjNJj\nvs8DAqgFpygMUetngK1JRuE3SUdeebjFlWIAIDpy1o2ruiB7YoxQDROP5NIS\npcCOtw/ZJSEzsyYxZuUoxIWHR2hmJCEwoN12t7X0D1l67leKIcLBTfH6sYkq\n9lLytsZzVKrGkWo4fv90mjJnUlixyIpwFAmpdIuki7pH8apIXnh70HA9Gjij\nF53aIW2vQ3xi6GCwqrJLKcOFu8yURdHwjcaWPAl67Am0hjYGJ/mtB/TbNLLj\nwFrcT7hRUGJwDEN8C3aL5nzkdOzAf7F2YGOW0O12iW9w9/aljqdSPiQZWH2o\niTCLSxf+nvIpHu/iZVrecxRMFTfQHGB4AIMKsRu6I8Ym6Bw3pfmc2ObESb01\nnwh0vTzWpSodbOXTNK1AL7xnwdjlc+YnWfxqsma9SToIcbtCLc81w0DZm7ZI\nH4arrd3sS6SIyoWn+ibFUzSj3n7hTWDAdYmGbMfQ0JZyx7nRjJ0SdX2TtQZS\nAwl/\r\n=+PTt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0-beta.22","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0-beta.22_1583192506004_0.5457295835082452","host":"s3://npm-registry-packages"}},"3.5.0":{"name":"@aofl/templating-plugin","version":"3.5.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.5.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"64f9a90ae8c606962c74e9d5ef5523d73216656d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.5.0.tgz","fileCount":12,"integrity":"sha512-MuKTmwg3KMb23nywu7oXj2MaZyUw/6nYo45HTBUk5zWVN7VW4tYLOavjWev0ATFc1OyT3m79JErSk5FAZxerAQ==","signatures":[{"sig":"MEUCICCNF9FhkPW0k3xounV93ZIJCASAxZIuzCE58iEvq122AiEAjGKxHLQYrTH/an/UKwvPjMisvINdLfBdCVuQJRoQFiE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXZ6TCRA9TVsSAnZWagAAOOIQAIYIQazcVcC0Kv6KdXyQ\nvgsABLDO5hcxeZTMXQ0TSSTLAzSwneIX3AY2TlqUewTHO5WpmFixj6C4TGWH\nuFzCPa2n/8RV2Irzb/27o6sK/dgNBJXwhjTxmI9yfU/WubEcrf2bDJRHq7YT\nBJxfyHmpJxQwYpowGCjAfZ/bNg8CbzEUq9dfdJIpwKh59KW453b40eXyjnd3\ntwoA+llJ8TKxYDK9Svcjr/W1b4sYtuqhAwTbcClF5i72P2Js8Bzi35iMgT91\np7XHomOE9CJa8gLCehE/WJ2Get5SNsN4H5gdRREs7cUdExVa3LImcQmFSqqL\nog0lWQiQ9sRvWx6PuGk/+sfRRzUMxCtrU0MM3DSW3MB3bj4T8jtTwfJrxiRm\nu17/RUjJjHm0sYBGS8zIRcFfwy61xUz1sywwvwLVZYt9voCEHwGiveR9QlFO\nFDUOBsnNL+4WW2LqzoqTFuTeIz9WenWddXzLk/sEr0yTDe92lGlPr6c/Joa8\nwyFbL/lXfFYpnnmJ0PuE5RE/oEV82dlovRKn0z9Ajqh6PDRQiWdhv2y6GjIb\nRbrApEHhq3ygyv+ZnbCwva7DnvlyDLnrr6Tk8vPEo6DRr1Xn3Bb9w9Onf+Oa\ndsSg4DE+DSPnk5yMMMQ+ZjQtqbAWmYNtNEpKs7+LV35/kbmmiFCSqKBxNq1b\nbypM\r\n=/Cif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.5.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.5.0_1583193746828_0.6891826580605405","host":"s3://npm-registry-packages"}},"3.6.1":{"name":"@aofl/templating-plugin","version":"3.6.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.6.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"40fab4c396628d12bcc0910788a7607c8d0edff9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.6.1.tgz","fileCount":12,"integrity":"sha512-NBHk0RETBEMhIQ7tN+bCv98umy/p+cJGRBmhtokEC5KHzg0PhBEMMn2Ra1l99W9MhzolVRCbrjVa4hYOhud5Hw==","signatures":[{"sig":"MEUCIQDJVCBVOg/LiLrOn2h6sePfVYOb9iyif//IkwhYJPBP7wIgQOLc4QF9i+F9PXBPzXTZ/GFHcR6NZmRZDr015iMuv/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ9+JCRA9TVsSAnZWagAAr8AQAKGrgX3/u9k4gtSkdl91\n5FmEIVaDbPxuEbh3pqfUAt06Y/OCBx1LyTTGlx1r4DX0JSh76L2ysPJohs/H\nxo8U5ZHELpAXr+zeFeHVarUd/0+5k8MPH84oOR4e/0RnZv798qsQsLtOyVaZ\nOD58uhyLvrLA6u/2KPIm/pjQqqAxnwSv3VDBRsCFC0ZTy290kVxFNymGsKNO\ncPUywPdc9gUddZ94kaN83Lu/8dimHW15NEuWpXV124anPsSoXbsE9THSNIAY\nY+mqyi/XFA21VpAq7f+5aStaNrYbY/YDrpr/bOBJLrT4baqoKt/wblkY0LeB\n0NWNWILB4YCIqxweGYNKaz9knWuxVJl7cXayuQ6F6PEbbHry2hCBGGs2txT2\nBf+g5zSwqIQN12wjpTfofn1Jz8WgqYPd66aEr/QQdJsXSgyMypnPkSdCbJco\n/Ok4Yy/uzMN1RtpmD2W0UqhOBbzFKIsv877epao7AL8c5aNELOcje+AfiHB1\nMXBuzahxL6H9F8JJO9SVvgVQVPGI2HnlLhGmLrZO4LlO8WbdndhyC0Gg4NJL\ne00aeu9R6iB7/vGeloJEItnioH4a/g87tWE2xv2JtL/2BSuc5cPttvQvXKzf\ngVzkgEvMJpTiHt87w4xugF0mah3evmhjKowHdNwr2y5M6ftGU7zaEXzsoGKK\n65UB\r\n=bFHj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.12.1","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.6.1","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.6.1_1583865736735_0.0003692508082653312","host":"s3://npm-registry-packages"}},"3.8.0":{"name":"@aofl/templating-plugin","version":"3.8.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.8.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e3a11224b80f2e77aee7d8c9ca92260ca18e1b9a","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.8.0.tgz","fileCount":12,"integrity":"sha512-tmDhxQ7VqsqsXKLPxKU4y2+0IZhh9yxfDFKNcwu/e/2CMtK+xkUS4MJGF+DEBX7eQ81kZSGDLtxLL6qUmpHu7w==","signatures":[{"sig":"MEUCIBixILAJN06bIIwd3CwlD6HC5Y6kVSFx8/TMsOnq/l5BAiEAyptKFIU6l26zT9dxRfV4y0Bk62RGP9lBEq/BjxKgouQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvafCRA9TVsSAnZWagAANI8QAI2SaCzc66R9TXex4uF2\nyAsTdtcAs+GpRS1vxh1DT49o4NOvebK842q7mJReX6Gbpwq8ZKTnDhvFZls3\nWzi6EB/ERVCC0oF3Cl65e1eBH/C2pygyK6I/Uhdib4rwwkz6H3H2jHXcU5EP\nmRdeD0QM50s5hiVjc4QJBp40FrElkAFRji1bc4KYLm4zPuqo3ouOdTORzi77\nhmPU2oLDPEyhqMQ+7Avkg6MIR0sURQZHHkfDC1UtnIJ47vAN2b8QaCvAk7mY\nGon3H5czNzsCaHhLUMLFe17aODWV7h03XHGKVqeR4qEMX+P9Y1fQT46iGsp+\nqtQug6jf/6HP4+0CCeuSsbSNmZZUvgY0CBmDqakx1MnOk9WYeMI39cQdCvdS\nDPz8Z66MUAIoPr893bKZGh8+6OMBuPWNfB71t0kxSmVe5HhwcxAItR2ggDEa\nW2ogSgj/O+huafhMv/SOXy9Rofs458RCBUU7uMDxhnk1xiKXruMNjEDPefNk\nR2dudLhyt2wOIWmeJJz4YShjzZ3aZLCq9K1tb6PzXchNe/iXynSIRe1XpLWC\nWTStBCWVx/TZNrVDwy7ZxRu6DoGU1NkyqRhGROFLJTJiAtVi1BUdV4he/hBb\nfaPu9bboeHqY9LAXRaO8dikv0m+Fvwi1K3HhVKhoEwh8P7yT+rjlAu9SjZH6\nfYoN\r\n=Rx44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.8.0","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.8.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.8.0_1589311134676_0.394684237981191","host":"s3://npm-registry-packages"}},"3.9.0-alpha.0":{"name":"@aofl/templating-plugin","version":"3.9.0-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.9.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"4a7e1e7dc87f7f8c0e5c97755b1c72846855b59a","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.9.0-alpha.0.tgz","fileCount":12,"integrity":"sha512-7JOEEDcxSHA0bJlrs6YQctIEZmdya2mbhQ/IYtWwoRbUNQk3lmh9TXA9vTpH8WSxRwvxPTZyViy41/4Jir4aJA==","signatures":[{"sig":"MEUCIGdIQSzjsSYoN9QxKM3JmauWSIow9VNTKgOdDrWA1J4kAiEA+sP29mYPTB/Kk0THsPUFTn9fOVMMWwm0cSKeI++h9zs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvkRCRA9TVsSAnZWagAA3EAQAJAnQp3HPyForDTs417S\nSeR/kSTnTYVg0aI8V29OzVnW2pU6RTjb0jqO6kCujvDKQYT+Gyykcj3rw4cf\nBw+K64BLTs4km6PbSjiHATQHLkylbuntybu2MtQmx1izXjyfOcrrD32fS+1p\n+jPy0R3ZrtGGh1tdhcl/ht52nzfCKV/566NEnZykmBWPx1vVog7Ts1Ew8kRt\nz/S5H9iE8ZnkHywDTDV1T42Tir08gnQgWkkc/QV2MfM0X1lMnvblNJDGO5Oh\nkF3ekfk1Ek6UeAY+MgClnACzjokvQB8WckVSkFuDGuQs6xvDcvpxLlFMr1y4\n5WaSvzs2Ribyu79dhUJQJY9BOxoRdfHf3pgnnuNHwgLYWl5NZwbRe++uD9rH\ngXp1zyLt+/bWElmPYpnM0+WogQKR+ShXUtIq2I2lY8HZQB9GssOYnOt/gijy\nrhCkWQFzG9rc1tgW91tLEmjtW9sXsdbgBNDr06rD3XkbUcUrVops8DuRHH+B\nmEMUou/ucLLZwdBv1Wi1W1PvEm1R3AdBv25K/Yew/kpddewvhJRnmfNbZl5H\nYJFaQyrE1AAqf2b3TlbPeWzKc2RX1cFgeLRK5bAk8KeZ6o9jep/JwXU1ToDL\n46OWXUr8ynac5ZmsgjIR6lepWUBuMp8JjsN/eDZyToqn3CDRTT1ikjrPwg6t\nIXA8\r\n=XjhW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.8.0","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.9.0-alpha.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.9.0-alpha.0_1589311760836_0.9436993634512201","host":"s3://npm-registry-packages"}},"3.8.1":{"name":"@aofl/templating-plugin","version":"3.8.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.8.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"57caab4e9894a40376f9f705e4a9006b0f7aefe7","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.8.1.tgz","fileCount":12,"integrity":"sha512-fqX/j8buHAErlmC9kVWw/iwbx7OVbQMuyARk5ReZbCioa9h+3/AYaHdnZFl5vaemPp2P/SIWN7/HRux1LlAerQ==","signatures":[{"sig":"MEQCIHk+xwQHeBbXhz47Br+DxXjPZe6qwWd1KIVBvm+9oXZoAiB33FOvxDpOQ/KftgN10RT6EEXBct4NIL8NKnf8MqFz9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuvuUCRA9TVsSAnZWagAAy8gP/2sq6Kplb2ImPh6ZgfIo\nugXbTyOA788MbdovFcnaV1unX6o47qgjXcjgXeQNVLgLPig3GC7vk6Uh1D7s\n1Zi5G7aoBi9nLI7Iju5XDQJTqdQpjfLaKNS95iYOFE+xxNKoCpOOz0S6NqcR\n3fESkuWlZ0Lgco/yJotqd94xQAvKGLCE5iYNNUSmDEOjEYwcswTZAgr66eIz\nJKJbIDdYhE9vbPHRHm/rC+bhFvQYPPhr/vKSswK6fGePBS5dusWcakqQBzNO\nq02PL64Y3mqhZVIqtdhNIIAPRPNb9NcFF1Yh22LPshOb6O9xcz84cd1ZSkXA\ngIQDTvlXpQna/THCp35xmhLT35RbTXlHJvYYaYF0X1sXO7v0eqZ+viaoPob/\nJfppuP6p9U883t1m+cAovbzZB9BXMMTxpqeLjk1jLVTpcuyQ58PWNe5KGYHI\ncKLvZJafdYHW1Ftf8SdJLY6InWylEsCrdlGHt5yXvruaOWUzOUAz8lgvIDoE\n8BU8T0NCHk6z/YXzzU5WdZL+8KbC07YaKvoN/EctzFQja005xnsbaELSREJg\neWxzb9NHtIR3SG9GkC0sUhOGRQhZRW1V0rzXun2prJkCofyjJHc49qkJ4BJK\nBFNxdwGoGmOoTIDBvHosciZWnjHoVU+kIaRemjNi2BmCWK+9bo4KpwFh7an5\n2G4j\r\n=6yf1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.8.0","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.8.1","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.8.1_1589312403802_0.16171172391816113","host":"s3://npm-registry-packages"}},"3.9.0":{"name":"@aofl/templating-plugin","version":"3.9.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.9.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9042ed9667a8c9b2353646bb5a65ccc22f2ab882","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.9.0.tgz","fileCount":12,"integrity":"sha512-xnA9i+0DNkfIuhDz5kuFdqfpbILQgd1YRUMtf97nAEyLPBvON8MPWb+P4jo5UlL6zGZB2kiP9/qTTi+nhD8RMg==","signatures":[{"sig":"MEQCIBjPNtG7kZDbSFvz+qCCsbrgv4yrj/s6lgUN4IsInR5uAiA//O+uLaIotXyqt+XJFbSQyA/syf8+k9evx4x65Jcm6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevtgDCRA9TVsSAnZWagAA7LgP/06lg+v6kp3B7MRrKGUo\nNWsYz8S7XkYNv1ZKy4xJksKh61hEMDONNw8QZkeDMJ165fR3YKzozR3gv1lQ\nlgU9Ijm96CeNEhiOIUtPHLUGsEIzrlxsQfSEj0zfkBY5CIEqCaKVCsd56KYR\nSFI0EJWm1mQtLjE9WYEwGCBtXYfqHTl8rdzVSnNvprUv4f1XABnIyG8bzZHJ\nkTXQVtEgP9nqEvwU+pXpsuwKU1PJpa4SKs3d35OgUmb5Hl40Lob7lSn5I4lB\nThydpZZqmQj69DyMP9h1v+k892+xsje7ABuC0qIceZR1RiF84cjpWjhM657a\nlfLsZTIP/GHZ7SngOar2tWAY/KoH0mt89MRGzgiWGz6tQMEYaFR2hNpZDqGp\n5toUmSI5r1w60vCmZ6SRKw1024Lk6CG75CeftC1+QTsfbpjMXvnbLIBhdOhf\nol4VI5gaWFOM+uMY0aUl/BBSc/2purAGuOndL0OB4vxBhsSqucTiFOQ3bRcu\nuhC6S49SmhLXFNJIuK0GZ0N6Fm3KDwGSH2gwv6e+Fh6qndsTjpCyRJV5qWnp\ndKlVdjXmM/4Nz/rD85moz++LIzPe81TU7Wr1WEuq/SdWHwkfCqPodVAuSyRm\nMlvD5z1X+yVS3CgSh284cWc2gx5Vo5wTkQzeEVhpbJY85YByI0eHzvbECDBj\nwM/I\r\n=Ytxh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.5","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.8.0","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.9.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.9.0_1589565442622_0.7767753120977192","host":"s3://npm-registry-packages"}},"3.12.0":{"name":"@aofl/templating-plugin","version":"3.12.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.12.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"78af37f8d551b04c389868623d41b6f15c5762e0","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.12.0.tgz","fileCount":12,"integrity":"sha512-sndWQxLhO8YR7vDu5nq1mHftJB35VPQUCvAE9KOhmOnItBrVRm8554qFVafQLaWfdVLKcyV9tUJsNZu8wrL+wA==","signatures":[{"sig":"MEUCIQDnBPLJZ1KrZIdYSEveYlShqjp3DSG3oEHyRz/DSjUQkgIgVjLTWHPyhG2R3XPyl/aJ4dVtaeNDyPsLTZNi5vF4SkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB3LACRA9TVsSAnZWagAAVqwQAI8X6HHtPLQ2PFFq1WhW\n2ySu+1lCIG1YWvz7I6iCHVl60r+JSfGw4fsFEPkldXpjynJA5CVjgjjRA+96\n/c4gU7Ze4tIWMvtOONLMqqGFAxJSYuF0CC86e6sGsFEhQ/bkZXPlJRnFeLDB\n7srxKrlZ76FtCdFdc2gxqtYzz8gJNM2Uv4irphVsb2dtxEGFg9PbCCGg8Eor\nKlM1dBAtSMuMoBUgf2+uCD5eN7c+0cMxE2T0BaSWNoAguTXg2nkRNobyIb/A\nMLB1gyu8stHrRZ7fRf6T9OQvBwqdbm0/Kam1+HyCSnRtnjuRMetVYFlzvXTA\n2V6oszqL65JqBD8tpT4ujt8FLbhNP7Mx6vbChoh9qI4ApkKjC08Q6uYAO8Gb\nzKyeiemL6T8q7gKq6v3If7nmiKDLVrzPmem7XyJNSOwuhOhsWzBRNsdDdbxl\nUrVVbnc1gsTiZjtaU5tRAgoHinYj9enz8zLomMXoJRnqlGW51Y73jIiIkPz5\nEVCVkCzqTMDWDOusSMx1CmrTo3mlbtlQ/vIqB0MWyTYzIfDCAyf96hPEyaV6\nVb4RV3eioj0YTyT+gofmBbgQNH3Hh6bhOheJqUxhF3gY2trKZjBlvnU9UH7+\nJFbaGtvwAUXr9BK3VGy/AnGygTzXlkJt368P7k17f1H5GXsOwyKz/WCa29tJ\n0k0/\r\n=AAyO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.4","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.16.3","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.12.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.12.0_1611100864169_0.89472605046763","host":"s3://npm-registry-packages"}},"3.12.1":{"name":"@aofl/templating-plugin","version":"3.12.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.12.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"826780b6de96be7550b8ad963bcd5cae548aa82f","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.12.1.tgz","fileCount":12,"integrity":"sha512-0efAd5qHDg4jWsGZs18KaHI+fvFZ1YtqtV90+00AvaN8Hiee8gIzr6+7BTdafXC2qXW+4hZzlxiYQMpe4mYx5Q==","signatures":[{"sig":"MEQCIHdLDMVz2KAaxlnhDt8YR5NKwzeeRGxotkIaRZMidp+kAiA0+csvzQWkfuoMzvwKpbgApTpEAF2J43KRTT6JOHffCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB3VPCRA9TVsSAnZWagAAz+EQAI0/SoMY8C2DnGIP67Kt\nZYlUGhEGw2cjsZVnZvtCnDFchK48pWSYtE4tx4KSXPCJY2RuS59suKr+wnYp\nKWaJFJwixohe0itBbGrmsnRfu569z1us1GFsr7otJ83n2/uqwT2nSSVRJ2Va\ncu/q9VCvrs1ccdlfmgoTh39IxOnkVlnwSlOyzJD7d6x87JdqLothru+gTIvq\nZoIOZkU8vVe5XSokUgDjc4bqsW8I7qceR6/uMN9TlPiR2OVdlQgLioXqgLOG\nEDJLvwGTQJenKrSJxzdKfFmuQT7aSCxGtDosgnpujWid0uajqOCEyMiAQz8i\nuZPF/GidTVKsRwDQZxHnSbCbtbc7qe5c7+F6lLoWTeU48/hladWTYXjlXNXk\ngqJUKpCLfYJbiGz7yMg+LxVaNft0xYCWs5g4mWSgSQA24I7Da2ihBjrrnCde\nSTbxaTARMIRN84DFOl2Qla5sL8+UJchBSikzP/axFPkQkO6kTx+3/suINjwk\nyzmtzPqeivL5c1yTGnc3WgkjJJmgidmN6LL/OWQhAHfhr4JzlFSwSD/LAhdn\nV8B+fEwP+d2SBgvTTJEX8NmD1jm+Y6I5Sd1fVvHaFmmtBLLI2LwXh3o89an6\n5fZZ4Uum/wlUGPncofkPw4jF90rLVcUZMSOVPMk7YfAsC3pTTaDY3BVnG1Kh\nf9yE\r\n=7Lyj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.4","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.16.3","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.12.1","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.12.1_1611101519303_0.12463919806109147","host":"s3://npm-registry-packages"}},"4.0.0-alpha.0":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7e695d339f3d287ec8ff7a33de083295d57835bb","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.0.tgz","fileCount":12,"integrity":"sha512-CBw75VGFzLP6SkZo+2LdqXrN+SgevQ/mJt/CvxFHqBTLCL+T4gMT2EGK61+o1leGe9/gdTO0wTCjB6C0qHMNfA==","signatures":[{"sig":"MEUCIQDLKz3X1st+9h/2gY+ZqLlMDn/HPoMnDBPL9eMliAODrAIgfkFWrX6C+6IYtMLJzg5VF10zJzA/0dfWid/sgOmBvPU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGcnGCRA9TVsSAnZWagAAU0IP/jL2nIuIPY9xxA+Ydsgi\njTT/6hgG1LHK7QG9T7dddN8OAonbRApxon5+6cpUZKPMY491rQDMzTj2zuz4\nAmoo2ATWMOqBFSqDlc8OFJB192YXYVpLHAPOYRdyasKM3g7AW89UUOw0SY1a\n9NQCN244X37QXX9lT8VD6oBNCPa6YoxVHgfs9CEg0U8o/OQHf5HTBibbZAWk\nCAWhBj4FFw2BsbDsuilObxLjYZnuOP0vTXUjP7ES1FigNk6AU6vbX/cAkPRi\n70o7OYKHPcebTa/quY01QDkiYv8CWsVZrAh3u8coS5C2mj9I2qjzXd4KuYpO\naSm4VXfdi4DEvVw4X5U8+AizUhkMFmRL5ltVYDZUIlXJu/AAWvtLEyfng2Gr\nSWcGDszFKYucgIYLwEB91hSk1yTVZdKZ+HoICrmhbHfcmMR+SzMlBqWyqp4n\nwoTs1MHH+OXyaYiCPLxCYXGdfTLlTp89HvYt8whJ/4WrQtK2T5LspZ2AdBXn\niGl4EYYZvNPKAKVdrzh/xq0AmbY8VIzcsnBTr9o3bZKGpXlnXtTBd3SwXKZK\nDv4T2okNV9AVgvdm/iH61diFcKOxSiel580gGYl/WKVlY6t8zf+LwUQ7p16r\nKMlQijZFyXivFieD2pl6y1IxzLNJ8pvbRJc7sXEKEzusxgCeGg84gYdcp0AZ\nhAzm\r\n=/IKB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.0_1612302789841_0.04213733964209232","host":"s3://npm-registry-packages"}},"4.0.0-alpha.1":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c30a01f1b564ca7426c52f204c14dcf6ab8bbe1d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.1.tgz","fileCount":12,"integrity":"sha512-WXvoKYYymsjWZISwndItk7UK7nuxD1YP69RSa1KDJu/v3FOusvyGgSXNsK7chDFs0V9Fq1vFcY3whlMhnAtniw==","signatures":[{"sig":"MEQCIH35/ArgcOORd2Gus64tgKio7kgxYM5GPnf5wnspiDJgAiBP88L6zE5YHz5xrxfDwrmK03ZMlINbNkvmimFhBla4Zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdVmCRA9TVsSAnZWagAAOIYP/10CXrbZC1z4DS/XCl1s\n4kzh05u1ZlduIk+81uyQVm8jCTlZuLEccdfst3EErYJmpM/8ZSmqgTkeNRw9\nqPEP4Dq/iIgRCdRWU0cQBjdd4VOFnpBV31jJqX3reziBKl505RvxHj07Hhd0\n7sC74Sj9KgxDNqYqWCwfM8OFcKMSSjynkK4cKGJEtRBXszDXhlxcxTVN9fgx\nZrv7TON333Ncljq0jpHwWG/p3GsQbZruPXlYGEx5x5INRRPddFf0v65WYcm1\nxNOmF+FO0So8bNyb1WwjxPTW0TjGRlYaiX/RB3/uyCR5h01wTlUVbH7IRvlb\nTPTisLC72L3NJ8M6+GHc3pf2CG+EW0iKEmj5zMWWgRCjwW3Sa8iq5gWAxj9g\nUup2HrRDV9iFI7GaMtw+vPCtGgtKZayLRNi/Os5O7lCJvDezfQg6BgB4CFmK\n9XeL8sEan/LIkbONM+MwLQnh3ozglr9KjzFjh5vexfE0leRyK+3OWZm5AoT+\niwaXnz9/wI5GlTF1ibSDJHXHuus01j8hiPzF0kAu2taGAbxu5EG3r70jgumX\n5lmn3fMm2ZxE6YFse7wijRXdGsZNEK1EP5Th8BtcJ8eCoa8IB8Jmk0vhgW2C\nxu5SaQfQpEeTdVJ3FB8JqXiaLoAK3N2OCzBsMSu7saNGcCbXU0iJMpMo1nos\nNg0X\r\n=4WqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.1","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.1_1612305766186_0.24879865268683887","host":"s3://npm-registry-packages"}},"4.0.0-alpha.2":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.2","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.2","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"23d33161bfd9aa9f97a4f9468a68427ce86c1e92","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.2.tgz","fileCount":12,"integrity":"sha512-T3k3ch4V/Z/dT9uUbx714V5WiyOUq/YykQyG+CoCbnFnelsc/3/uolKbfdYWU6lTdgFJwQ6CzWkPPfkPeLdifw==","signatures":[{"sig":"MEQCIF6I6mX/qPFRtDZm5pxF2pEka5eGjVQzzZaZCqcBtjIYAiBZ1VNjZCrIf6ZfZR8ybOlFAEuAuMo8zStfdCrDTpRDFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdntCRA9TVsSAnZWagAAzuUP/0sVaaIKLoHtA2VxBcBt\nqHxAC/mzqScs5QxCnMROVXGDnl3p2XzS7og5HJk9qxGoHuS5J77K/MtYRsZW\nhlP+T70uhC+GdAMivPkAmUy5x2xNIFLiAu3ZRxG2Ld9MyBeb9XFmEwYmir3j\nTocmoywBIi+T7Mn8+ZT0xRqOZjKeBw9RJX5/cKbcU/MkuXD19qFWgO8I23fz\nKxMJzTpBUR+WGEo4sxnMT+ycn7VY3cwZ73CC0xPJ8LSZlAJnSnX9tLusU7wm\nj68rpXp7gmzZ+yUygbGvnYKpNsffPkF7Q1XyGcIUTzc9l5JKaoiTmKEfaS/v\nD6w32mcpVdD1257GxJ7nT23g3eyc4B+8ZzqJoOCUOKTGVJusuSBzLiKDAS5V\nGcRz7GsAj73ksUEqGBod45GOE9XLcayYzoeXXiZnUMq29uBMGS6TYR9atTt8\nuz+pf6yK8C568ydgVnnHWTeDXaeUIW2o7NwIOF8jMS42RxGh3tlVXdpwAjiL\nIuJijmAX1Pl1FXP8Q8MhOHROyUIm7m7TpZk4Y2sRj3jkKuC4rZ/pfDUcgf2y\nUU/Q+XP8Jgl36zo1K7VBA6OXDglbbMV/AkTw2SeYNWOU15exEHwLLWSiVOYS\nGvBy8SJtdGxsPODO1d3mWK7aafFyzxpFovfKJ4azQW3u1MdX+ICI3D31PtOX\nl/Y5\r\n=+z6Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.2","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.2_1612306924684_0.3831275733488453","host":"s3://npm-registry-packages"}},"4.0.0-alpha.3":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.3","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.3","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8af946b7b598cd829f09ce082c6bc0ced73fc096","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.3.tgz","fileCount":12,"integrity":"sha512-UCnNG2z9KYHQw2GG2y+9DZ7Iq2CvixjNahqLR5AcHu9fzeb+F9LQhNJW3Oqc6MRiXa0GmXPJbIanBgYPRo6hxw==","signatures":[{"sig":"MEYCIQC9uatgQOCRRTnPTua8SCiF5tKSMwijQTobfKXyEdrFkAIhAI7KBI0QNPcibtrHPDiaPJJ6mCGvIcgDCdyFgyuyP9ee","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGdzVCRA9TVsSAnZWagAASroQAJri21Vg9Cr1uoitpgfP\nRpOn3bKhWTmCQPc1opysBxyVG0X8/9u1DlOC5xy+YZU8JtkdayvRWVIDbJV9\niWT/XUPTaSSkNtQqyKcCJEnnrSRsz6tl1ySJzyEiRzBCZiuCQqx87cCoixKN\n8Bc55Gtub+JIGk/MCt7F6aJvYXtXyKEMB+nxXZTQ8pKUCmDlU3xqf0ivNWHz\nwEen/H+8KYKNOxSC9fXIlN/SGNqBNUIqBB3lSte9IUe+yJbgc71RPm5ZG+ys\nz6w/XKdWSGg5gmKjpz3kaI5kOzuHj7mpTnAUkRASy8qBM2kLjB2Ny/VlSdFi\nJi+yLax7MjhXVOibHfomsIbpJS92n+3VouhHeJNhvevx4Z42yjCg3lRwozmx\nHAOWMGafcGraBgaebmAMYLqF+65Jo0Ud0Ea4PTW/Fshaau/1cDxqiGpopAeP\n5RFqaLMJ9RMhTW3DvU7dM/r1z5h/i4AZjtk/1f3XugfEBVKhPzwWIHmySJ7E\nEIkqy7fivfHHULVYzkqzc4a9kR4i3JrQ0P+Gfr/bWa93SnrZmNRck6dfD+5N\nnex+4KP+9RdFD5atnfkCZsqyfFRvzWnlqTBDXiMFmjUmUpBvwDgTSrTC6cfF\nRmkP2LObLCi3dungKdbrfX5gmuxkMcOy9Nzotq+R44TeLzful5pfMKFf3DcS\nETPQ\r\n=dJw9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.3","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.3_1612307668689_0.18328197412254443","host":"s3://npm-registry-packages"}},"4.0.0-alpha.4":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.4","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.4","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"61deee64f2656d28eec03a6644fdf0698d8b622d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.4.tgz","fileCount":12,"integrity":"sha512-K+ml2BiXM7Ey7lSuFO6CRyMjF4A+VajgjstmFUtK/9e/T9s3Ohilsg4uokHDs2kaaNvbDYXhPDNUPXDAQyskcg==","signatures":[{"sig":"MEUCIBLAE2U4YYq8qTq0aNGCD9vBrAH7pRxXHBrBhQS0xhSzAiEA9Im3hUYP0h3+q71DATLzYG3DFFAFTm1853GSn1peyAM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGeDsCRA9TVsSAnZWagAAZ1oP+wfXZ2Q5CCuJbh4EdlMg\nikppOtlrlCpse+17vLYhwXliWBV71i83Bkg9sFFeLLS7PfoeILq9za9Jq+Dj\nnoSru7k4A1W3GococbzKmnU23Y6/1kyOnqoyVMZBQxd6B7/hSV3wJ4HE+58E\n8hU9eKPtstv6U/umOc08sGDhU+opZ75jB5XAsPv5w0UzvCjWWvgiFJhtnWK1\nYGHQ4sOlhmXiUDGiYzj2TyDzzmtvrJptoGBgXUsE68pB0e0D9uTPrusDPeYW\nlfM3BpvuC9WgtF358q7NqLzZ29dPU4UIL95xfFGmA5YMpplMnU7U+B9Sipq/\nlHoZKTExd5enzZvhr4aNfehdkll6ksW5DKrvI75BrlBPIGLUkl43N82aBD+W\nmldoDC4p9kHN+TAI+2ftAPVHUMD0vnzFkmIW4ByILi74ZX2aX0rFcTsAi1Bz\nUqDDf6Pv198vaMRCKsbL+s3SaVx4UxCNUxQNnjECO3D+Fbtj/mzVZX18xzHP\nbAHJkkMSCthsMOtEEzMi0ddDFUQFJSjwCP0+HqHE5vegfM4a9O1maKAF6vSX\nIV5cms64tOL+lM0pfUV5+KI2XspEHqnEY1F5XDl5+RHIlG2VVVIZ1xkcT5va\nlW1JqQm+Yq3F0p5uya/GUTcjuexPsWhhIxjoeHUHtL90vnQmneSny3pc6164\nnj+t\r\n=BTVK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.4","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.4_1612308715696_0.9810587432600304","host":"s3://npm-registry-packages"}},"4.0.0-alpha.5":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.5","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.5","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"50dc9d537017b0f2a8975cdbadc7d65a2d81f15a","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.5.tgz","fileCount":12,"integrity":"sha512-wmirTS/7yFsoAYBG1PljP9dBMh76jZRrlGLsIfFkuwi3sK09SQYORAiaoBHrOEFHBdDewJdJ+z7x/FjnpGP8kg==","signatures":[{"sig":"MEQCIFLatyXtAOqyNE+YC5SZmGZ/o2HUDwBuQjCDUQGfnEbUAiBSgEXywEHsMEELUSyjoXVTY/IeP8p+zpaMiPrJl8H9Wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGfb7CRA9TVsSAnZWagAA1AwP/20JUrnPeJt19FKByyFF\nTTVefnNwLgGtTH6T0641KeHb6yKVNDUqFXTL6PyAPCZdAM4F4hHeJABsowEZ\nN/ckd+quQiB86BpUtSe8kQBMqBwsGsSIh9zLrRoJgmWi2AftoqHqrhYhGnMX\n/lp0kciJ+IRDU9ALgQmNUv8uXu8XTCmRAlb2p441w+7fcZAHuleF+a06l7GO\nnCFgw1LhOKxBnwIeDJ3ElNFXe59QB2utyQwUopXYmFXJqrQHhcMUWrbMq3BQ\nYUlL9EbAafjh1F9xpwzFpl4thCrvcyBVyWIc75NH61adLAv2P0rz6De+S8Vd\nVl28kO1Rs/B7sUfchjruwvxapK8xFg4X3kT/IcrRoCJ+U3xMNrHochUfRKEv\n1932F21kRalD3x8EKjuwMufRAg3Gk1XAscb4A8KHzYU3r/x7RbaQrJX5CJqj\nzYv1mzSTDBR0FhgJ8pyBOEHXyyPZt+339ucPHD3KgSkvJRxf1QjD58j+kGq8\nnEVQI4+h5VdVfyEfL6IzJ8HDx8NfdM5olq03FlgP2c2oMHMKYjbmS0EO1mDH\n5Ffj25Krbd2hZEeSJm8eoK6BCsWtCVBEpFWi+EHOliY2aK2fxHSlwh/Pjz9i\nH/r6B7wTAkj5lI0ruSpvlOKkuSpbApDEdCAQ8qfbyIq6A8ityk4Z8ZXeKISd\n0uRE\r\n=s5mI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.5","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.5_1612314362783_0.1509752390532133","host":"s3://npm-registry-packages"}},"4.0.0-alpha.6":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.6","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.6","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"929bb067e9f860a2352180929452ca93a861f837","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.6.tgz","fileCount":12,"integrity":"sha512-1agD1zQqYxDler70VBuA5+LNcIHl/qDjvsXpRDLtg93cd31jV7EjAeA3IQ0CttmFWBOgkAmnX93k3D2nd1VZNg==","signatures":[{"sig":"MEYCIQD6nI4QdpjINneO4Fkostx2ljLHjKGxMVY5Me7z+UpWcQIhAM7TXoCR4Y/lfU4/JJXINUIjko/sGhgKHuaX8mq/zJsb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGfuMCRA9TVsSAnZWagAA60oP/2QU5ELZM3osl/gNtz9W\npPSCOp3ipEmgX9MaRvPNEPuAQoHK9no5Ecn3GsBxJ09Ealr+OseCTutHZrvK\n09jpHgW9qksFlQqcZZmFu0MdpaegKKXLhH87v89XaL3aHynC9+XrIpq7pm0U\nNRltDpMF1lHOn3uq8g1u4hBqfX1MARa32XnJqrvysxc8rGXA50B+yB3dd9Nn\nb+bFfSWZHV0uugyS0cRgzyrAjFKd8DX6u9Jvf/zQf8eVeWMg8XLLaWfT7xg3\nbcUoASlf7cBDxTdxDN0ix3Iw8PDiOWg2fN7Ib1ndq85Pxw0ezaNs/upPlNtU\nC1gm0Yub2x2unGdaCAwZTbk5O3tnZCOqB9x2kqF7n8vZJDDifClslYoEgrUZ\n9AaZaW0XNQcZA+xKXKKhZZYLDo5k+H69W0b9LTOB32NpjY7EDlyFHHZ4QD7J\nPX3CUnetWe6nyv6BzU8bqWpKBt/0L2CWqxbn4FgmVnvmwS0isD/MLZjWNipy\nXlgxFsUNKMtedYN2NnaKitOnHvyROs4/r4vOevBdWKCSxfA9lA+YBfoxlEJ8\n/9A9BeemaqAJOlOjMVhvGu0RDKFHsyudBMpOvTqgJNVfwrj5Ifb5CI15VUhE\nvZHASx+vYdrkF6JuK7g8YQ3lep9SFOOZWjvuIrB6RH0PpAhA0sx8B5Zx27tk\nMXXh\r\n=BL1+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.6","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.6_1612315532021_0.5517844570750383","host":"s3://npm-registry-packages"}},"4.0.0-alpha.7":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.7","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.7","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2d9a44ad0ef232cfa16d71446801475f78ddacda","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.7.tgz","fileCount":12,"integrity":"sha512-yAVv+qRadHIykypUpESQDvzmQNLoy4pb2FeCdR0jlz4dFsEc6EuIodZSnrNdYgAEhf8I6r+wnBxTajlyFM2j9A==","signatures":[{"sig":"MEUCIEd5esHzp03/pX9/DCVcwOmwPASKLrt6PSlD36BIoUTGAiEA7YGdV3LdAMgzJiAumwHpSeExL/1XTWlka1l80h/Jwms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGf5FCRA9TVsSAnZWagAAnLMP/ikkHs1TKrD/DD9e9d0J\nw6zeFMh/jzxIwcZgMwzIPNO5z9todsAsl4D7+GqwzcoYMr5PMqjBS4uzxZM9\nk1qRP5gxObnd4FV/qt5Neag+W8G1uGne+kvZkIXTWDe1erShwmDUuNLDIiLr\ny6KSwqO60vvklWAuGsR++xuaTEhiGjvpwuhPGalgYyVpKlbtUIZgZuubaTf6\nmSs8hBO5/uFyhiWzJgreAtHY8BS+xJ91rt4BhZxIYFYMPWQ/UbQlWNV/8o07\nFCYvN+vLwyBgzj4JnXkem21MSkRandHlHeDSCFIN3eW8G/5+fftKOtyyVGy/\n43cJQocgnv/AqRFtbV/jSjCSze5tPsEVv+3kPYh8uJshJsSjU25fD5JQP23H\nr+aOLimS4lDpxExWd7RRyhXXCZyXdFWr3hkFupEiBtBd6jE/Kx0nIhUD1xHi\nzVLeknlrGKRPazUJNQ3eBlmFb4bUWIH3X5oyKbAqJYwhmLuMFQEnW/CI9AVV\ncglKjE3RjtM34XrXUlDSIaSVpxZw7Eyr/pEGyvEnzdUjEUdX4o21NXNnLMZf\nxq29h8vRpWuP/oI27KDaDNrRud5daCaq88nHiIJy+3JXbH/x1Nn0K+/8eysN\ncAJbQVVGHP5nZlQtHB3bcWJJj2HBwW8yc2puEH4G7ejGK3UYlHg/A9MziDIa\n9R+w\r\n=zWW+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.7","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.7_1612316228730_0.21514812477033662","host":"s3://npm-registry-packages"}},"4.0.0-alpha.9":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.9","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.9","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"5db5fd9e11b72ce3c5e9fddaa269f689787d6186","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.9.tgz","fileCount":12,"integrity":"sha512-Ab+uBOtADVMin6Biw2NHQWOIWPPvcKyjDOWhGffqYUY4jxUYyCOCa2lsdw+Uwsx8i6SU2RHnjhbM7Jb8xG/esg==","signatures":[{"sig":"MEYCIQDgDWxDiKeKuu/w8tbAyfkk1xtWeAP7A5+zK7EwlWVbIAIhAO+65kuQwm5Zavgl9kX1zcm5aGNzrfKrkTJ/U5gt5MlQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgC7CRA9TVsSAnZWagAA/4sP/iJV0u122PzkBbd4AQJZ\nLzrGEzoKTsmgEJhmhkXPYHv8tooc4b42tE1AU+wFkxvaGPJioHqZKsP4t6dS\n9mA1DwQJDvfWN+ScA8tgFzc71+gRp/es7NxMemr3E5Vpkos4OA1tFH79+VHv\nnUKD8iPiw2vCi2g2Tkxozt1q9fKCBxnogK4/y3vuD8WD82rCf2hUyKGzHYMy\n0hBZrqdUerb0RkaDWlWJLDWo1O75nf6nz0lV3KEOJo24fkNWeXXiKhS6Ua7w\ndQDKzjfLkBeoeZprFu8vpi7059fHgr5idcqUxsqyBwgW817OrIJSHTzJ/Y1/\nIDEEAdEiaSqblg9Woxix89w60ngLe2oL898oRyBbbeXyWDIs5kVeO3C+N8gm\nPBrmjZXzaqWpinwwtmmJvpAzSYLloK7V+BjqQu4aT9AzIQEaFoFPjkpQEZBn\nX9Ne2DfqgZKlzKwZHL7FeLtfm7mgfq89y0OFOUXpuHYGo0mwuO2K5R4LLHwO\nq8L4gD1+AftrbWcVPeY9NIQd3z6cm7bcW27E07rXaAFx8P6dUDfPF4/Bi56P\nUhnR6VF/iZq/sd2BLCfMdkXqA0cwt5YDBiKW6bP4fMD4GT4zxuKTalDd/XiW\n2wBSouwFN6nsO4ViN2uuV4dJIyUIcNPrcU5Gu1/p3pkMGKQGxpQSUOur5HC2\ntTgi\r\n=LAdD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.9","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.9_1612316859395_0.2596685952668212","host":"s3://npm-registry-packages"}},"4.0.0-alpha.10":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.10","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.10","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"af3495a427e6fb0343fc3b5eb59c8b5dc7a1215c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.10.tgz","fileCount":12,"integrity":"sha512-l4Rb9gGtHq/pGK8EuV2bOJkjDfwXxQUtc82SLpRUvNY6Ktpc+JULBu091AhIfyQHGo7XaebhhHeuEsFDNdxvEg==","signatures":[{"sig":"MEYCIQD3g8hUOfLj+9iqMK0l/VZtjUvayLLt3SW/o0lGVbclTwIhAIHbYWBFwr3wX+7RigZDpwDl2apWBn7TWFrq/4HKPrus","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgKhCRA9TVsSAnZWagAAUisP/iStH/GvgjPVTw9TSjLd\nk2MmOBp4DZcbrvmKrOPgfs5LYLJmC2AffftMASxPOimXW1D/7ubTakN+K5RY\nmQiy76n+GxqLlP/wcivhl3f1LMBNDSBGJIK2TZnbF+kTW4Ky6LlnFF0QvF/r\nO48MSeVPEsB8F1t/84Y+ad02DZgQ6KWWdbP0QF9ycp/OIZfQIAcNWRTGAJb3\nkLWKLHNe8LsSLukXVxeCLRH1H5NSyPL4L80lB8Hxt67uPCTcUAdPOes5tsN/\nn4yquei819rEOlaUDV+ieba8W39iX65ch6GRej6YWLaOz4EMqYow0iWdKTQ2\nWn1nYq7iH+V/+OOuEoN3p3EjUsrcDRoWNLPW2A5ImdLYKg3JVUNHi7FdPjLA\nDKNaPCtJ1sci2CTEJ/1N/2EtrDopnb6p6vRE2F2/uyatQhZGkbExntgWsraG\nF6/0O6RcBR+ZrJ0qnTBfiRRxA93oU0xmc7jola8Yu28EzxejgG6MtfHqRDrq\n/ZgEy/a9lB0qOwjqfSHCiEA344Yntcg41hI9xEcmr8dDigGamDLw4jry7afO\nHP/Kbl1bexHlWsrscqY834NDzQETs5DSQW3+/opbB51Zx/NRLxpLF8EuLUid\ntiCT5/9NrdHIhvxIk86x5FTz10YFM1KF+2kQiGUCbWvZpCa0D7Ed5PTHAZi7\nMAv7\r\n=2ihy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.10","replace-string":"^3.1.0","html-webpack-plugin":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.10_1612317344874_0.03793646225489966","host":"s3://npm-registry-packages"}},"4.0.0-alpha.11":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.11","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.11","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8c9c23aa16564b510d2589f49673919b8323e315","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.11.tgz","fileCount":12,"integrity":"sha512-4QXweQxk1ubW778VUI8Yk6pIMRXQY4yD3bTaTvSjScVdJZlv2SGT8kQKT8kls8XbAs5+y6N8DA9NZwL1nBtKfQ==","signatures":[{"sig":"MEQCIAN3Ag7LX5JYfCStQM+E+p/AInXMCWbc+/j5h8/2Gck1AiA0l1VfKTVXWClwAWhH5Ms5MdIWCPzmr45mhu0/R82ZUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgkzCRA9TVsSAnZWagAAZ1gP/RHBmH220bx1yhglo1TK\nUp9txEZfD1HNF7VMD/LmXSl1PUBDIb8KvqX7QmR1z553OivljolA+F83KVHA\nnUBcJARpg6jn75lU3m12k7PTDHnDpkmAibr6luS6cTzUmzjay3NwBoj+ZFFD\n8RPFrHZWrQhpom5mqn+aA9NWmUYwY/sQ9Bc6Zwh7hDnRiSmkupAkRucVnfMF\nqAAjr2ccAu3MxzFW2FqoI02m0u1MDDYp7cpc0/gdVD4tFqhfuxnAc8Ae0N6s\n58kzK155E4eJhYQNB3YWauT7XUPSyLCjT9CEutCD/HiP1TPh/ILprxdZyp5J\nUViP5PDm5JY33uEL4RfgNV8i33B1BOHgj450tTQhKGQNBlMXjBktk03QEeXp\nl55g79EzOzpgW3I7rGI7SrVYbAH0XPCDZVjyuyVtpG7nOHRsYtA2FtspLRTv\nIJvWM6sDPkv5Slbk5hSRuOhQv4ym+nnB0z4nHA9com4QtPl3wx2YSmKTmtCo\nNf1x7pQwi8BbCxzcE3ArinH4fHkZHrH+kHhm7rQpIsui5vH8U7Kj7PJGMgPN\nHi+t4SIha3c8StHj7JjFp1lUrzDCFmnY3jFcBppF4TaDQBsFLYodvFlyr/jH\nwA6DS+eW+Z3oPPofDEcJoCadskGM+ArHbY8RfGLHYyw0VhcAcQLkPQVkkR5d\nt1Mv\r\n=Df5b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.5.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.15.4","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.11","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.11_1612319027090_0.24399061303259995","host":"s3://npm-registry-packages"}},"3.13.0":{"name":"@aofl/templating-plugin","version":"3.13.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.13.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e450163461f997a8bd32a00a2d2e361ceee5fab9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.13.0.tgz","fileCount":12,"integrity":"sha512-Ot7bYpgRBLgl61rulUjCkVx80FcDCW0ZIxex/RTUGGuFIrhCUgNhsEAhNeTe5r4wOoNc1wgwElYmxuopbiQhqA==","signatures":[{"sig":"MEQCIGSajUZj5PYZmGDqw266UhNGjgCj49gj+kmkUj4usiXCAiAlDbK+SNTyt6c6IOvN21t8L0E8b1YA1IdhzKZbbxJ2Ag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgODYHCRA9TVsSAnZWagAALk0P/3gi2/dhiznHA+ycXett\ngSCl4AtdhBNVaP1zTL70pPZX78yfm5Fz9euhGAXp+7O8i/ttxZy4QDCk3v2E\nUsjWP1ThcrkyM4l95c24l6Hgi5+CK2XxMnXIZVWgfozq2McqGDDDLEJMzglC\nlsoE5fVB3R0LdxAok2niXSgyOOSy9w+0NE0dI0C59vof+F4jMCg77alub903\nrwXejD/BSCPgBCToojXukLLMCaLEIHB0Woby75Kc8QtEAI/XRmy5Jh4wT0wu\n+61N1N9/qwSioaVLsQF3T8lU6aNhbra/tgCJF+slP36SkxSzl3HIh4LW+DbN\nxBZlhGqaLrZszoyp1QdRHASbOt2cR2JTJoYF+0HODvaCd/ac33i0ReE0uUmd\nyhzsGHnQgrziE1GGAFwWerRl7wF2rJGDTIWYelLkX1ZVgld9mviI2ylTlAet\nH8AK42RkaYDKilhVZ8BqCeV7bF2DCmhHfbHAUgiKbhMDvRTjc+Q8aQEyNdiS\nu/S7MbC4fM/I+fkxfBONSQTQNfspdoi5ZW9+qvKTxIEPVvkNaK0w+3JGffhx\nhphmRhIsSdik6a0Jr4glDLfcxg1cYidPrkDVrIj0gQDgERIbS+/pV4gmZCXE\nsD5Jvx5dDPPs0IuR7SFGS/mnFawvoH9UHCYDec9cACCtjRItWdmFq4mfF+i8\nPcr1\r\n=92NW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.13.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.13.0_1614296583064_0.7790813459708528","host":"s3://npm-registry-packages"}},"3.13.1":{"name":"@aofl/templating-plugin","version":"3.13.1","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.13.1","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b48871b63b77aea88e82771d7834e7496ef2e2be","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.13.1.tgz","fileCount":12,"integrity":"sha512-XZSZfwVkuj6uoNITYScoW7LSN+/qCxNFBfG+gAlNmD2fWn4Z60q4nVU4WLY6HVPYlLuHCz7gz1bS0R1ii4mIwQ==","signatures":[{"sig":"MEYCIQDxlJ+YfrFXD0gFJEoKuS8WUEXdCFgzvRifx1bODgyxIAIhAPYYKL5TMkuiaJDsPbLxF9KhYOcCCdnR+SHrRO9K4CpC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh11rKCRA9TVsSAnZWagAAwQIP/ivLSjWFwUBqvq30Jyj2\nIkSCD1QFptHxMo8IIpD4bIRlvyhWC65zMeBR2dSK8EBz5Afprp5FAsZt4qkR\nBy3cBOSFz2B+FVWXq//ZKImGEJwW06Zmc1fwhRYxhNzxBkqjimepUpjP+F0N\n7CCq5Hn0AGB6KlJu2MIpCAug9nfUP+vhlr5aTDDs7tcN2aPuGNVvOoXtMaDl\nuhlpG4uQgkfJPm+rlv8jleP2B/blC75uA7JND/zGwI2f5n/AKKWLL87mxmeZ\nYrV8sCyP6zWyQbn/VtffcO13Vwi785q9gKxA8+an+IsSZeBSAgbfksJ17sAR\nyrR1BTx++53ql8UY/7VBNdDKFNgDpCh34TJ65ovIcPFp5Y/WPG51f9AHwDHZ\nYMzY9Fq7K6D4mvpPnVlR8AuJ3P6mUu8oV67IuNsfG67wO03g51ekDTUhq8cU\n6Mvzf6Eh3Q7tPjDDasw2Q8GdVWJ4oul638fkDwCwV6hpR9uKMXnFjokRF7QH\nrbEFkwkDZc0xX6ZxNXZmI2Aj4mFa5nhKtvhbx+4JFuj3VNUztuaBgnJ6h04+\njNpqgbbbU8CDhyiaDYVLSkkNV/txSHSJTunnOrd8UcHpVCRmQm0uS0vjB/bZ\niZtejQs7Og322YUvu4IHR3CtHGvGawenEDrrykeuwhUmy6zG3MtoKCZZKBJY\n/u1H\r\n=efFH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.13.1","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.13.1_1623800904202_0.8465035759989004","host":"s3://npm-registry-packages"}},"4.0.0-alpha.13":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.13","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.13","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7d2d2556e57cd40a88f35d26c8cf0bb830a5ed32","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.13.tgz","fileCount":12,"integrity":"sha512-+ti1dSAppGW4IUcjc9aOic1GZ9wbzacBLX59L0NjZTwBWwnEzkSLFdG0aE80TvLmVGNv3kOj4ewUUsfLULSWIA==","signatures":[{"sig":"MEUCIQDIt42TWFXdBTzSfwjZIQubSiLjC/+PxIFgzcsU82RbzAIgSf533s35/ChdkdQggSHh/YkEoCqct4vUO7QfNzBezJU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33387},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.15","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.13","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.13_1632439909152_0.08485267124357376","host":"s3://npm-registry-packages"}},"4.0.0-alpha.14":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.14","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.14","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8c1cc4a5d9ac3b1e5ac8def29911444945a8faa9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.14.tgz","fileCount":10,"integrity":"sha512-JpnN/vE5OeLiv4Z7+SGneA+WdhjdCKKdqAMz5/52j47xXEJy3a4T85TplA3kt6295054zisZBzr2iBCI4p2WrQ==","signatures":[{"sig":"MEUCIQDQlf6fXBkiWxVayCY4t3v3Wc1OCF0SNruZTGdr6atzVAIgcad9D6AlwCHbq8kBQUf2goq0N/zWEIo/KXJ+kXXRCd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.14","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.14_1633474506641_0.44240270550509586","host":"s3://npm-registry-packages"}},"4.0.0-alpha.15":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.15","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.15","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e27408fc2b65ec2787a3fb7477c382e319f09239","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.15.tgz","fileCount":10,"integrity":"sha512-x/bvEMUqVXLCIhii8mRbm7muRa6KQPHIwECyPCVBne41zp4Uwh/zfRPt1YppeOuS/hlwu3l0iQCeuS8U4vEIBA==","signatures":[{"sig":"MEYCIQCyAc055t7cAKq8niB9S19NCxwLEdZfKygjO63hVHyWnAIhAJQ7JOqwEISDKWfQnHO06JVcUGvNG/xWr/QWY3VZ2BE5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"7b448cf64b30502883b3422662a9480ea25f2d60","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.15","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.15_1633539826214_0.3774793581414684","host":"s3://npm-registry-packages"}},"4.0.0-alpha.16":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.16","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.16","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"48db337b6152adf1cb54da7f9dec09ba52a73472","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.16.tgz","fileCount":10,"integrity":"sha512-yOPZP+oiQ8NDNdvzLEa2sD6RgEfDv/HZycYJK8DUa1B8si3qVEU7s1Q0Vqie0crTF12io5jcORsyTIkF+/gX3Q==","signatures":[{"sig":"MEUCIQDRfvoHpIkkfE4z/tCVaJCrEaxXWNrolS/LLKn15JUvYwIgSpYkuYx6GrW51RTPQytxUKtWg/dL2Nqo+MJmYx0HwYI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"7b448cf64b30502883b3422662a9480ea25f2d60","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.16","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.16_1633539900413_0.7469275441630252","host":"s3://npm-registry-packages"}},"4.0.0-alpha.17":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.17","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.17","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"84578d883bfc7eec6283601d9d69a98bbc6d2baf","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.17.tgz","fileCount":10,"integrity":"sha512-RPlK/VhByagllrvv+65AfMhPXr5H272PONXwTgB6Nt8yI+rQBgA9/kOv0MpbUxF//wQNLwnH+cQsNvT+cw7YDA==","signatures":[{"sig":"MEYCIQDOCYAEmLVQAMISJwtJVwx5Q4VfxO9PHFv/h0rIE6qecwIhAL0pvKcWKhdzB8iKEVQbN4PcTySyYADrUM4omzl2uB50","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"c7b3ad6feb17eaf3721a5528e86a31ddfb350ef3","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.17","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.17_1633546042936_0.5995324541039293","host":"s3://npm-registry-packages"}},"4.0.0-alpha.18":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.18","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.18","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"7bf99779d8529b87acc9fcfc12d3d3b50191db2f","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.18.tgz","fileCount":10,"integrity":"sha512-dcqXu86CFNE7AXhHRdzzdhLPx5C/Aumgy6hL378L0sRS7iSBcET9dIntFwarlaT/qGKIjL3tKQD5rI7MHLUwLw==","signatures":[{"sig":"MEUCIQDe47FBmqwSQpSpVKtl6+nbIjoqmFMgkf/9rNisjwy+XwIgfVlQUfOlHei8t8oHaI4+GGocGU2clH2W/K/bzL5dLdU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"3971875a8be8fc1e4ed7f6c737cc9aa1653e049b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.18","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.18_1633563625871_0.14345234826805608","host":"s3://npm-registry-packages"}},"4.0.0-alpha.19":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.19","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.19","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"281a415d0ffab33869ce6be9712c41129230c5e0","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.19.tgz","fileCount":10,"integrity":"sha512-6R7sj3sAzbEOCT1gVHJx3vk6BkFlVwT2fTTAEKJ+q6MEF0mYzPntp6MpbK/WVbMRtclW6rgX9D2htSFelxvtoQ==","signatures":[{"sig":"MEUCIQDzEfvkEK5/51LqNr5oLoLsXKVsvtM5ctitIyH2LUDd4QIgKTVDQ4DFBqwQcazy650/BthjVrZlMq/NvfZXdTWOk4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"79369e766cd4fe78098059b93d1cbd7bb5dd8830","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.19","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.19_1633564042026_0.8830503233468407","host":"s3://npm-registry-packages"}},"4.0.0-alpha.20":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.20","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.20","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a7c87fdc0df3d77fe3c8c34345eddc40dfe04834","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.20.tgz","fileCount":10,"integrity":"sha512-xwvq6zW3+8g+pt6HSewzAsju6ElWW/OEWym4/n2khXyzorIHkkRAUrslXmzi6rvqcfeAdJ+nax4E4re3d8XOmQ==","signatures":[{"sig":"MEUCIDLiKgRLfgQ/7GdCics+G0rBrxdkSGWMC1TDt2RBRtv5AiEAla6eFN6CBuDkchWRLvDQdYbHX6fyZome51ZgdbsCIDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"398f195bda4d61023d6d7889598f5688c276f1bf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.20","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.20_1633564489900_0.25919645485429244","host":"s3://npm-registry-packages"}},"4.0.0-alpha.21":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.21","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.21","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e8537652c675904276bafdbe125184564967f968","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.21.tgz","fileCount":10,"integrity":"sha512-3uxwAMztPDx3HYg3ZQuUFit7/UKPfQj8ZfoOOHvb4/BLnrgoaXN2St1hMooQu3fre7hm11XjvHJ3aoEA7pBZHA==","signatures":[{"sig":"MEUCIQCxFeHv4C6WL5VJ6G62zwUAe2E9Ccy5TzWshEecKPpcnAIgZr84j0eJhlTGSagnsYZ0K2heSWkpLSUqR6MtVsrXxik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"398f195bda4d61023d6d7889598f5688c276f1bf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.21","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.21_1633712750838_0.9298149009739658","host":"s3://npm-registry-packages"}},"4.0.0-alpha.22":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.22","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.22","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9b1e179b5cbe010fb465032161e645da027ef6d3","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.22.tgz","fileCount":10,"integrity":"sha512-Ky95+v+k+dUBRiL7BjFXF7Av3UUQ7dY0ehUYm9yHCQgUqzDwMTXdS/BRBUpBmMysc9SygujrxXEfR5fw7oDkKw==","signatures":[{"sig":"MEUCIDzqvn7+TwtR4GxhQTiBNK1/D+e9pSOVBg8nWS8pa9AfAiEA2Pcf243FUZUF+K3OQsdBgQDZalkZTqu0ru/3F2Vp5BA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"289b7f60d1cd721d68cff783afc623c3f51cc2cf","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.22","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.22_1633984760932_0.3875770651150514","host":"s3://npm-registry-packages"}},"4.0.0-alpha.23":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.23","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.23","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"cc1e5b4d6ea1af5fd4d07047ea7c5af3f6660073","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.23.tgz","fileCount":10,"integrity":"sha512-UvBO1V0VlYiKv++XyYhE5Nj2jxq43LlnDNu+OgzvguIyMx2R76HHmOnqbKKZSew4+JOHYiDsEbcQYyEuDQeo+Q==","signatures":[{"sig":"MEUCIQC/tZ6ndQSNRZQT3s/Ll+sB6JSMEEu37KWS2tAFo44xFwIgPskprFfW7KCxN3wqqdE/6sklrRRok/5gUzG5X2YdDco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"a2829d023883e5cc51126ee549f70629ceae8e8d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.23","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.23_1633986436099_0.5939662524048568","host":"s3://npm-registry-packages"}},"4.0.0-alpha.24":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.24","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.24","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"9168a77d7a29e01530a4d1098778fbfb2c809e4b","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.24.tgz","fileCount":10,"integrity":"sha512-W6szPrI337oShPiazsjXgYSlxjtdFOfVZbY+YW4EacuBs6QGm724cWaGeSVehnb3choWON52xtdUoIfEv6YrSw==","signatures":[{"sig":"MEUCIFKWxdRbzZV547jmKATCfFmKAZG3G5vFeDH2MF9fOfqxAiEAje3+DLRDczYx3KF7FLKuGYzfjpVKBPHBROpV369sfVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"a2829d023883e5cc51126ee549f70629ceae8e8d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.24","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.24_1633988806232_0.485138480575676","host":"s3://npm-registry-packages"}},"4.0.0-alpha.25":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.25","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.25","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0f75b0f9f8a7807b4aa1f3f945b0ece519de4d98","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.25.tgz","fileCount":10,"integrity":"sha512-9EK9PK5CP5p3eh53mjtH4BRhhYQMdqKrxS71rBbLiF7o8sbSeYDZwwfNd34HZ5/L+BbCOYi53NEe9ZrKkCGpQA==","signatures":[{"sig":"MEUCIQCeHIwj+6/EnzKBq8nc6354KQYn3IGPfu8R6VNPDsHS2gIgTUFtd/+l7BeBtMaoeyrDsox8DvEFHvMKjC6BUiHyTgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"8e4d611be609be11acccb9135091aadd10134e8a","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.25","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.25_1634001640968_0.2801956602925306","host":"s3://npm-registry-packages"}},"4.0.0-alpha.26":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.26","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.26","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"71264c25b1ad699fa95fd0b76fb86a2b5833c81d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.26.tgz","fileCount":10,"integrity":"sha512-KNnXdebl08/o4kZelEnPNDA7zvexRLopQp90THA7gxuv4VMMZ0t8yRn7D/lGxgOzvJc71o4iEHwvkPD5SNNeQw==","signatures":[{"sig":"MEUCIQCUFyKZTv0O6hixgIy4KE4WxdqWt9TDgcZrcXi4ya1v7wIgFEEh9BJ7Sq/Yvgi/84twW6+T+W89o/73vYMh2F6/DZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"bdd06521b3653befa1b4c07318cc120a700672b2","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.26","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.26_1634002463794_0.9024953436379175","host":"s3://npm-registry-packages"}},"4.0.0-alpha.27":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.27","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.27","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a179bf1ec3e6de148470cf03d33122b7c66ff3bc","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.27.tgz","fileCount":10,"integrity":"sha512-vn9YrElAeEXfTL+gVoCliLJBGK3rAXtZzt7aSvP9EWhskuAJ+dX3In2iHeTh2BldS/45tlwGHgY9I1lsGGmvPA==","signatures":[{"sig":"MEUCIDpqinlYivyz595x/2qZ6/MWWO6RTMjvj4lisDZkvyrLAiEAkhpcbbGxy1at7R3IecmFxSaf92CZtzNffFkoqrTeYHs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"bc755f21b39459dc3a8b57ab25075a22313bc107","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.27","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.27_1634151982500_0.5995423346121125","host":"s3://npm-registry-packages"}},"4.0.0-alpha.28":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.28","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.28","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"11c7ecc1cbdea5c6221f82db73d1d7277e940d91","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.28.tgz","fileCount":10,"integrity":"sha512-CLItMFMa0Yv/D5ozIZSizpfZzz3mSrVnM3m0lQtHEkHoBrCkMmhw1aFT1ORYNktOhOmdKH7MlCgA4OJt60BgRg==","signatures":[{"sig":"MEYCIQC8UCHm18/G0qDoYHxSpo8me2MOwGlSRttDkD/96MQ5pwIhAPsvrA2OItVpUekbZ/qs8dD7wTMj92g2GizvU1suwXIk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"7dceb248f691c3214f73ba1d048f26b2653bcac1","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.28","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.28_1634163494656_0.7771325024137183","host":"s3://npm-registry-packages"}},"4.0.0-alpha.29":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.29","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.29","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8a6642b553fce87cd76b6fab68d95d09207c7f12","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.29.tgz","fileCount":10,"integrity":"sha512-YQdho6g+2+sWgAcESBuNva0eNHsEkC+J9WcK4+1+mH5AsuDdLSVlIryIanO5mxQn9iCmPI5KCh3r/aKNBZB7gw==","signatures":[{"sig":"MEQCIAoqtydr9E1OKG61TILtvMIcJ+Sd0kraJHtr2FCKTrmtAiAi1vEJjdZpHn6+80YHF8PMpEXJn9BBFTsBUfd30hKu5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.29","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.29_1634319348301_0.5543225178927391","host":"s3://npm-registry-packages"}},"4.0.0-alpha.30":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.30","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.30","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"1b5ca6f9fbe1b84daa36e82f56261e7ee387df6d","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.30.tgz","fileCount":10,"integrity":"sha512-FWCXuXfpDJ38CDupGS/3lGjpRwPOz+TR77joF2qaWvKyStI4INq7c8oFoFDlBH6M4VeHtgJ8zSu2Y7LWNbyUsQ==","signatures":[{"sig":"MEUCIQC/McrrNsT7aMRGLfcn5VsEv4MozxJvS88v/xh4PHoTXAIgXZFjrlFsqTQFYZAW2Ugqa+5lkTzgBKcojfyv2AoV66c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"13ed83fe4429533b22fd669328dd6c8829dffec0","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.30","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.30_1634323855012_0.08560808861809033","host":"s3://npm-registry-packages"}},"4.0.0-alpha.31":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.31","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.31","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"f7441b66ea5519844c498af29ab32bf4448685b8","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.31.tgz","fileCount":10,"integrity":"sha512-+65UlkRVHwQA/72B9PLY+41iDpC4xpiu4z3YsysDeS1U7t0LGxZ6lOddHZJnjjSj4zfkFedHnedH7OCjeBukLQ==","signatures":[{"sig":"MEYCIQDnZaMi+XLb1zvjsxOqHB7QbFhOgCODBYfdmFOedcO2lAIhAMH/Bcii8ZKvMCiT8eCO+v2AEeaNUzcCeGKNWB1fuC7m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"5bc1713dfbc60e5029713b6ad88a4a9fd46d3413","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.31","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.31_1634324116762_0.1727361505361369","host":"s3://npm-registry-packages"}},"4.0.0-alpha.32":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.32","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.32","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"08f03858d8941556fbed9942c2a0652c661c8f1e","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.32.tgz","fileCount":10,"integrity":"sha512-GWLv+CvEvZ08yh3VyZg+GHaMxvCMT/QiS5Syu0SJB14Qle6n2BtTmPQRdCdvB9Fc1Gx8SCdU5ACtYRtThSqLhw==","signatures":[{"sig":"MEUCIFYtvEYy/WMFl0glUn19VhQTJZHnkyrDsFW0EBkqCWmlAiEA4/TnJrlNo/5TWAvj7kcJaXNc/kOT35umrpDXj3+c3tw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"77786a7e5219aff408e59d051e8380ca1a63021d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.32","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.32_1634326780060_0.153970727988874","host":"s3://npm-registry-packages"}},"4.0.0-alpha.33":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.33","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.33","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"6d576928a5f24df161184737024827ec707a8244","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.33.tgz","fileCount":10,"integrity":"sha512-R8HKEvn57wcQgR1dkQyeKswBuAa3YofkH1D0/CSlbeWcUO2Im8c6+ta6/dgnlVX8oNrfwr0b8m+yAS+qD4hXgw==","signatures":[{"sig":"MEQCIEk1qiH7LjzvKBwMg8iI/TNFvt2K8IpJEGWbNYGW1hGsAiAs3fMfU/EYkO6ECoJdB3ubLmV/21vfun7qq6oklXsTzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"41b432602965620ce989f21e02748f53f69f7ea5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.33","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.33_1634326979914_0.293989212795831","host":"s3://npm-registry-packages"}},"4.0.0-alpha.34":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.34","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.34","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"8442dedf1f0dbb05c9309f1322dc7f68fba91ca9","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.34.tgz","fileCount":10,"integrity":"sha512-t1Eg9XHROAMytFJ8Vv5AV+oCeHF3axzUCQ5gajLM3Vs28lQb98U8jJTRLTZRBVrwNZ72wmiU/9GgFBQpuZ2onQ==","signatures":[{"sig":"MEUCIDjwhVtqSw7uZt7pzeoenNfDjO6psCzD2E/40MoAbhaGAiEAnFg0b2os0794pxQZmEXkCTkCzabZ6u8Of+zDrJhJPXM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"1b993e65b04444692f40eaecfc3dfbb29d50d98b","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.34","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.34_1634327585679_0.3398035792868499","host":"s3://npm-registry-packages"}},"4.0.0-alpha.35":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.35","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.35","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"448fe9fceade9034a0536a4a31910703706c02e8","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.35.tgz","fileCount":10,"integrity":"sha512-yBxinUqnxEscTWuUWlB91UfTHLzglFahO9uRp/71gZYCz0lAeWMlp0X1xH9CCdNrHvAJN//N1jDjZAw5NeMTzg==","signatures":[{"sig":"MEUCIQCtg6n+drxteTRVbVmtUzERRuWgZ/DhOKh8dVx/ZDkFmQIgObhTdx+4bDzcz60Cw3k5RdlEvl7ITv7LQ2hCvyJuUuA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"5a6a7f303fc21acc73b55413f38f534ed4bfb714","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.35","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.35_1634328007290_0.30616938346488376","host":"s3://npm-registry-packages"}},"4.0.0-alpha.36":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.36","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.36","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"347bb176f02216653f045601bd6d734b92949ca6","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.36.tgz","fileCount":10,"integrity":"sha512-Zk7z7siHgUNATOvnu6Oyic9Ui8mFLbjhfC7BpjQzweuptyhebczG5Nalto4nFzuOgUza/C6JDFgwP0mmvgRH7A==","signatures":[{"sig":"MEYCIQDwvLB1loel5jv6hVplYo0oZXn9QdS5SYuiXEje8uUbuQIhAIeVCty+zeWE/1pVUiX/AltAGVEppJ90RcoxnGBtB/xA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"24aeaf86244b6f9f352b26d04fd9976f9430bfe7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.36","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.36_1634328211170_0.9150912382709151","host":"s3://npm-registry-packages"}},"4.0.0-alpha.37":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.37","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.37","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"c4e6c5dbc68739b4437716f1d47c3f2d62a94f6c","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.37.tgz","fileCount":10,"integrity":"sha512-dWbMpMDVJHzqcEc4GA/ZFew9oBS27XB5FgCTugGIrLm0DQeq+ayGtg/dpssPTE7dj2Y3vlws1JRa3iZDuedPgQ==","signatures":[{"sig":"MEYCIQDUBlBdTjpem/tYYzGm+pXekaQGov+0GmnN7yGC7rgaawIhAOiFGBszE6Pf8QgF6aimchrHaKOY8OuQYs+ha36eyKzX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"d5e9c5a7ef77e315b759fb5bee226aa3bd3aaffb","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.37","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.37_1634328381952_0.07824533073699036","host":"s3://npm-registry-packages"}},"4.0.0-alpha.38":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.38","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.38","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"d1ba9e839ad8465ff0908709982c0ccd1970e552","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.38.tgz","fileCount":10,"integrity":"sha512-Wu4l/fhJx19cAThVR/orE9lzD2T5+z1zPl745FGjsZm8RRvcfgbqF5qdiAMSKUJId7bmM/E0cmDAwQgiHDiL8g==","signatures":[{"sig":"MEUCIQCrTBydEkkGV+hjVo60Hi7CIAXZfCo/VDtI5ppQiDrFzQIgVhJCT7htsx1xhEMlcHDNiKyhRQHMv1XPCmNUyoQ4WIc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"91457836070b2b300b852a461787c56ec880a85d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.38","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.38_1634330760949_0.6372206759458381","host":"s3://npm-registry-packages"}},"4.0.0-alpha.39":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.39","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.39","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"b07bf3fc34fc1fbbdff8e2fe7043048863e7aad3","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.39.tgz","fileCount":10,"integrity":"sha512-FHIhBNxfFVZCcokQovHp+ljAnSoSQQORnQq02U329RnYgzUD4dgkJgiBoOzFpZj5j2VDDjiHb2fvjd3aYfO5aA==","signatures":[{"sig":"MEQCIH+Q8kCnCbCY9XqmxQFP84weuQQ9cDA6eBihxZAz4mRBAiAV+w9wJfjcL6gCh/1NVlc/33Ud6PbLyNc4nyvBSwvKcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"f4c22e986eb7eb2e564e469dedb36c65858bf5cc","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.39","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.39_1634332197978_0.6645211555485755","host":"s3://npm-registry-packages"}},"4.0.0-alpha.40":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.40","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.40","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"0915a1324c85c5e6adca0656d28f16c1b14fcd73","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.40.tgz","fileCount":10,"integrity":"sha512-sJRPiesVePVOTYETPM/VIqpHd/3m4wb1YazwVRDx8gG1ZwfaNmuaqpmgDVdyasMtrqx85RvGwnh8xzyGxhdaMg==","signatures":[{"sig":"MEUCIFA4V9SttWuPvLOSXQ9JG5qO+URqOjnVroifxWBtWXXyAiEA+Ayn3EJS4APnyDt3ZIVI1OuUU9R9nWClAYBt5pA5YUM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"e93b1f585c2cd94383438abd74737a856ca68a77","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.40","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.40_1634332792640_0.2000691747254788","host":"s3://npm-registry-packages"}},"4.0.0-alpha.41":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.41","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.41","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2d5b5e5764d66861c558b7aa412680e7ed9027a5","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.41.tgz","fileCount":10,"integrity":"sha512-jbsz+GRG+Ria8tNq4xYBjjN996lDynQokhuVwbyZ1T9e1UdB6En1NVJEmNXvbItbBkEGl2PFhE1s2GaQOQ6J2A==","signatures":[{"sig":"MEQCIEp8wRHu99wBrkEXeFgtzHE03DiqdpxuI+xtH+Nok7FoAiAd1iTRILavsf0J9MoH2/ONGLm8cSY1mTEHiWFzAZZnvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"cbd55bfa3cf5e87bf7b5f27b3d9b6efb34e3ad85","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.41","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.41_1634582057777_0.525265389684175","host":"s3://npm-registry-packages"}},"4.0.0-alpha.42":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.42","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.42","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"ae88eef496dab31de99b8713a69416701b585fda","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.42.tgz","fileCount":10,"integrity":"sha512-eLzh84yeAIEHi72rxk4w6G1Y2TyiC4GWavlLvknm/z0in0vhTTRo9j+Ed9LmKs2ozbgPVENZmewbUoEJf5E43g==","signatures":[{"sig":"MEUCIQD8oBPy4zGUon/ih+KBq/dZKVJTccG99l72WAgJyR6ltQIgfP3IFb+S17oohEPHkifemFqchDO49pmHHj/6so/70GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"f64d10ec558694ce4c2d4e8b0562d4167f8e28d5","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.42","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.42_1634586025421_0.08770795297158052","host":"s3://npm-registry-packages"}},"4.0.0-alpha.43":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.43","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.43","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a14505c270ad315a5e91970e5c5188c21d0d29bd","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.43.tgz","fileCount":10,"integrity":"sha512-aKRT4ohj9eaXJgM/fpejirhNBSdXQBDm7ST1acylSdf/ZNrkpviLGXUOHDQsd12WmBR+A4KKs1JtIVsjekUBfQ==","signatures":[{"sig":"MEUCIA9RomPvFQwEFROZV+wUZ1LAURa0NEezKYhHOLBJeSvzAiEA3CvyYlDyhT+9C6FxcZq6dqSX26RoFxCV5fCi4hJ9tpY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","gitHead":"6763365b38cb5be764e669a3b568be9f1cc4cfed","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"7.24.2","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"14.17.6","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.43","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.43_1634586280690_0.16099035187436894","host":"s3://npm-registry-packages"}},"4.0.0-alpha.44":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.44","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.44","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"a5c780c9add707d17783d94c35bdadc8da7c2777","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.44.tgz","fileCount":10,"integrity":"sha512-vpCNaTwlEuEYthZJWiCIXv4Mo2+CGaz8yAfvVFaLy5z0EqbNBgoyRA5k/27R3cEIh4iyn0jHjE/l9XwIjWdx7Q==","signatures":[{"sig":"MEQCIF0EBfoKnfrhuvl1phbMf+NoFB2hPF7cyQc4kqnQm09FAiB9qNWcZ1r0ZvgwWmd4Hx4Ja1LYQDfVm4VLl/zl5cHdnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.44","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.44_1635874767284_0.26959021306129927","host":"s3://npm-registry-packages"}},"4.0.0-alpha.45":{"name":"@aofl/templating-plugin","version":"4.0.0-alpha.45","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@4.0.0-alpha.45","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"e8ed1f7f4e9c6692aa4f57552bb3252aa078eca5","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-4.0.0-alpha.45.tgz","fileCount":10,"integrity":"sha512-cGd1A9nCWh+DvWjGXCtN2WdeafIIoFxLmM4GryvDsk51bI7T4jSQgoM9xjPBphTK+/0NxBLmgkTKCSxSi/iljQ==","signatures":[{"sig":"MEQCIGfOTJCXZ4aQZqnK+j05p/h0yKHJnKRLRxn9eqzXdP6xAiBSGxh8z3wsAdAiEoYy0cVVWP073Vl1mHRuD/smHRy00g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29089},"main":"index.js","readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"6.14.11","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"esm":"^3.2.25","express":"^4.17.1","fast-glob":"^3.2.5","puppeteer":"^6.0.0","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^2.0.0","schema-utils":"^3.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^4.0.0-alpha.45","replace-string":"^3.1.0","html-webpack-plugin":"^5.0.0-beta.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/templating-plugin_4.0.0-alpha.45_1635876945906_0.015798489103622693","host":"s3://npm-registry-packages"}},"3.14.0":{"name":"@aofl/templating-plugin","version":"3.14.0","author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","_id":"@aofl/templating-plugin@3.14.0","maintainers":[{"name":"alexdinari","email":"alexdinari@me.com"},{"name":"ariankhosravi","email":"arian@arin.io"}],"homepage":"https://github.com/AgeOfLearning/aofl#readme","bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"dist":{"shasum":"2cf5a880a9ef06668898de3a193aa9a063bff729","tarball":"https://registry.npmjs.org/@aofl/templating-plugin/-/templating-plugin-3.14.0.tgz","fileCount":12,"integrity":"sha512-Kq5IURLQKshBCoiBQCwvznDCsVKKBl8u1ANGShAs6jk9K47asboApbOotS8ZhR4FnnX3AvwFYJnJBUs4U8JMJQ==","signatures":[{"sig":"MEUCIBXo/IjGXZPlDY710q9HYXBGSTDQWUJVdpK3OuGNsNhHAiEA6v+GcM1zVBbyidTzbQJh3xHahFDnD4uJ9Mnc7mNq040=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiM9KYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHBRAAg391M7snm+OavjWGPBl+1Jtqb/GTIIFYwn5Tr/eTY/sdlsa3\r\n1uMw1jE5RSYiE58/5Ov7k72JcxnmumvfIEBEwyhAPZQC5bavBOutXlmpi5CR\r\naO5VC/dfGDrRBMrhnfHbz5shydDkNl6rZUHiItuxoCgODch8nynxQyjmGmnm\r\nJBLdLwJvySB0DU3DyJDambkQSITE33SHzqmysAfLzlWvHi3BN1MWMDzHq8Ki\r\n+/4dQ/d7Q0j0A355C1kRrYSWRtjMpxHy0TpuiTsqI6JnZ60K+ZiqRTvVAddY\r\n2wyi3VLdjlM6hSuZaMmU23ohHUMd3+zzbJoujhRNZio3BjCnasxiMXt3VqO2\r\nATBnax4FlrmJPHWp7lmkIk28ZIwQyus0hx8KRFBhsHUQXOetuFojcOovh0h5\r\ntEMUl5KNp4tfOv0gmJzhvikWpJlocFdfh03CaFg/YEhs6K+vTOTRw16wYRAH\r\nHC61ML176Woq1xZ0AIXvVEhdcvUZD7t67T1J780Dg69BhiETcICaTGmOcL8c\r\nvsbIgi6a0UK4NTtl9zf2yuXnBQno1Psg0IG5XNF1Iclbh1I9bwBYuJUbn6qa\r\n0K5+ImC7wBzCVSTjVwhgrBuvMKfEy19irV60NSpZIC4LrPpAGQtDjgfxhIS3\r\n3PM3sd6UbA9mJh+P7uwP6iVxoQbDM37bCU4=\r\n=6M0l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"01a200342c31c108d1ab1039ee4c972f2ee63fa9","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ariankhosravi","email":"arian@arin.io"},"repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"_npmVersion":"8.1.3","description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","directories":{},"_nodeVersion":"12.20.1","dependencies":{"express":"^4.17.1","fast-glob":"^3.0.4","puppeteer":"^1.18.1","doc-parser":"^0.4.9","compression":"^1.7.4","loader-utils":"^1.2.3","schema-utils":"^2.0.0","serve-static":"^1.14.1","@aofl/cli-lib":"^3.14.0","replace-string":"^3.0.0","html-webpack-plugin":"^3.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/templating-plugin_3.14.0_1647563415967_0.933520003702119","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-08-05T07:41:44.131Z","modified":"2025-01-18T00:21:04.901Z","1.0.0-beta.21":"2018-08-05T07:41:44.212Z","1.0.0-beta.22":"2018-08-10T19:31:49.437Z","1.0.0-beta.23":"2018-08-16T21:45:14.561Z","1.0.0-beta.24":"2018-08-22T22:36:27.038Z","1.0.0-beta.25":"2018-08-23T19:31:25.812Z","1.0.0-beta.26":"2018-08-27T18:23:28.267Z","1.0.0-beta.27":"2018-09-11T18:09:53.104Z","1.0.0-beta.28":"2018-09-28T00:17:48.900Z","1.1.0":"2018-10-17T22:38:27.848Z","1.1.1":"2018-10-18T23:22:49.671Z","1.1.2":"2018-10-29T19:48:46.853Z","1.2.0":"2018-11-06T20:55:12.270Z","1.2.1-pre.1":"2018-11-20T17:22:09.004Z","1.2.1-pre.2":"2018-11-20T21:05:50.264Z","1.2.1-pre.3":"2018-11-20T22:47:08.359Z","1.2.1-pre.4":"2018-11-21T00:00:19.484Z","1.2.3":"2018-11-21T00:20:20.616Z","1.3.0":"2018-12-06T20:52:39.842Z","1.4.0":"2018-12-28T02:33:54.564Z","1.4.1":"2019-01-07T18:33:21.635Z","1.4.2":"2019-01-08T22:45:43.478Z","2.0.0-alpha.0":"2019-01-29T00:11:52.482Z","2.0.0-alpha.1":"2019-01-29T01:53:55.468Z","2.0.0-alpha.5":"2019-02-26T23:15:26.311Z","2.0.0-alpha.12":"2019-03-27T23:34:54.987Z","2.0.0-alpha.13":"2019-03-28T00:07:07.076Z","2.0.0":"2019-04-30T19:31:50.758Z","2.0.4-alpha.0":"2019-06-19T00:36:44.005Z","2.0.4-alpha.1":"2019-06-19T19:39:25.289Z","2.0.4":"2019-06-19T20:13:48.847Z","2.1.0-alpha.0":"2019-07-17T18:05:52.695Z","2.1.0-alpha.12.4":"2019-09-16T09:23:50.109Z","2.1.0-alpha.13.0":"2019-09-16T11:00:54.112Z","2.1.0-alpha.13.1":"2019-09-16T11:09:57.475Z","3.0.0-0":"2019-09-17T05:22:01.330Z","3.0.0-alpha.0":"2019-09-17T05:24:03.085Z","3.0.0-alpha.5":"2019-09-20T06:32:42.449Z","3.0.0-alpha.11":"2019-09-27T06:49:28.305Z","3.0.0-beta.32":"2019-10-14T01:12:46.756Z","3.0.0-alpha.12":"2019-11-02T01:11:43.086Z","3.0.0-beta.49":"2019-11-17T03:38:07.017Z","3.0.0":"2019-11-17T07:06:22.282Z","3.3.0":"2020-01-22T23:30:43.541Z","3.5.0-beta.0":"2020-02-22T23:04:27.455Z","3.5.0-beta.1":"2020-02-22T23:26:00.318Z","3.5.0-beta.2":"2020-02-22T23:52:05.243Z","3.5.0-beta.3":"2020-02-23T00:06:45.100Z","3.5.0-beta.4":"2020-02-23T01:56:50.283Z","3.5.0-beta.5":"2020-02-23T03:09:31.336Z","3.5.0-beta.6":"2020-02-23T03:17:13.016Z","3.5.0-beta.7":"2020-02-23T05:04:41.658Z","3.5.0-beta.8":"2020-02-23T05:08:12.970Z","3.5.0-beta.9":"2020-02-23T05:32:31.412Z","3.5.0-beta.10":"2020-02-23T05:49:54.206Z","3.5.0-beta.11":"2020-02-23T07:36:41.094Z","3.5.0-beta.12":"2020-02-23T08:59:33.185Z","3.5.0-beta.13":"2020-02-23T09:01:39.085Z","3.5.0-beta.14":"2020-02-23T09:59:40.592Z","3.5.0-beta.15":"2020-02-23T11:48:29.382Z","3.5.0-beta.16":"2020-02-23T11:58:04.261Z","3.5.0-beta.17":"2020-02-23T12:13:56.724Z","3.5.0-beta.18":"2020-02-25T03:59:00.395Z","3.5.0-beta.19":"2020-02-25T23:56:35.949Z","3.5.0-beta.20":"2020-03-02T23:22:08.131Z","3.5.0-beta.21":"2020-03-02T23:26:33.624Z","3.5.0-beta.22":"2020-03-02T23:41:46.314Z","3.5.0":"2020-03-03T00:02:26.956Z","3.6.1":"2020-03-10T18:42:16.890Z","3.8.0":"2020-05-12T19:18:54.789Z","3.9.0-alpha.0":"2020-05-12T19:29:20.962Z","3.8.1":"2020-05-12T19:40:03.981Z","3.9.0":"2020-05-15T17:57:22.737Z","3.12.0":"2021-01-20T00:01:04.277Z","3.12.1":"2021-01-20T00:11:59.450Z","4.0.0-alpha.0":"2021-02-02T21:53:09.934Z","4.0.0-alpha.1":"2021-02-02T22:42:46.516Z","4.0.0-alpha.2":"2021-02-02T23:02:04.846Z","4.0.0-alpha.3":"2021-02-02T23:14:28.785Z","4.0.0-alpha.4":"2021-02-02T23:31:55.811Z","4.0.0-alpha.5":"2021-02-03T01:06:02.925Z","4.0.0-alpha.6":"2021-02-03T01:25:32.509Z","4.0.0-alpha.7":"2021-02-03T01:37:08.836Z","4.0.0-alpha.9":"2021-02-03T01:47:39.522Z","4.0.0-alpha.10":"2021-02-03T01:55:45.157Z","4.0.0-alpha.11":"2021-02-03T02:23:47.236Z","3.13.0":"2021-02-25T23:43:03.237Z","3.13.1":"2021-06-15T23:48:24.364Z","4.0.0-alpha.13":"2021-09-23T23:31:50.240Z","4.0.0-alpha.14":"2021-10-05T22:55:06.794Z","4.0.0-alpha.15":"2021-10-06T17:03:46.402Z","4.0.0-alpha.16":"2021-10-06T17:05:00.583Z","4.0.0-alpha.17":"2021-10-06T18:47:23.134Z","4.0.0-alpha.18":"2021-10-06T23:40:25.998Z","4.0.0-alpha.19":"2021-10-06T23:47:22.243Z","4.0.0-alpha.20":"2021-10-06T23:54:50.007Z","4.0.0-alpha.21":"2021-10-08T17:05:51.464Z","4.0.0-alpha.22":"2021-10-11T20:39:21.066Z","4.0.0-alpha.23":"2021-10-11T21:07:16.238Z","4.0.0-alpha.24":"2021-10-11T21:46:46.452Z","4.0.0-alpha.25":"2021-10-12T01:20:41.113Z","4.0.0-alpha.26":"2021-10-12T01:34:23.968Z","4.0.0-alpha.27":"2021-10-13T19:06:22.648Z","4.0.0-alpha.28":"2021-10-13T22:18:14.768Z","4.0.0-alpha.29":"2021-10-15T17:35:48.664Z","4.0.0-alpha.30":"2021-10-15T18:50:55.166Z","4.0.0-alpha.31":"2021-10-15T18:55:17.188Z","4.0.0-alpha.32":"2021-10-15T19:39:40.498Z","4.0.0-alpha.33":"2021-10-15T19:43:00.146Z","4.0.0-alpha.34":"2021-10-15T19:53:05.839Z","4.0.0-alpha.35":"2021-10-15T20:00:07.500Z","4.0.0-alpha.36":"2021-10-15T20:03:31.367Z","4.0.0-alpha.37":"2021-10-15T20:06:22.094Z","4.0.0-alpha.38":"2021-10-15T20:46:01.132Z","4.0.0-alpha.39":"2021-10-15T21:09:58.146Z","4.0.0-alpha.40":"2021-10-15T21:19:52.817Z","4.0.0-alpha.41":"2021-10-18T18:34:17.932Z","4.0.0-alpha.42":"2021-10-18T19:40:25.610Z","4.0.0-alpha.43":"2021-10-18T19:44:40.899Z","4.0.0-alpha.44":"2021-11-02T17:39:27.471Z","4.0.0-alpha.45":"2021-11-02T18:15:46.048Z","3.14.0":"2022-03-18T00:30:16.163Z"},"bugs":{"url":"https://github.com/AgeOfLearning/aofl/issues"},"author":{"name":"Arian Khosravi","email":"arian.khosravi@aofl.com"},"license":"MIT","homepage":"https://github.com/AgeOfLearning/aofl#readme","repository":{"url":"git+ssh://git@github.com/AgeOfLearning/aofl.git","type":"git"},"description":"@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes fi","maintainers":[{"email":"alexdinari@me.com","name":"alexdinari"},{"email":"lorenzo.battigelli@aofl.com","name":"lorenzo.battigelli"},{"email":"alex.dinari@aofl.com","name":"alex.dinari"},{"email":"it@aofl.com","name":"ageoflearning"},{"email":"jie.zhang@aofl.com","name":"jiezhangaofl"}],"readme":"# @aofl/templating-plugin\n\n@aofl/templating-plugin creates multiple entry points and automatically generates the route config object for aofl-js applications. It uses a single template file and combines it with partial views, meta tags, title and locale based on annotated routes files to create index.html files for each route. Just create new route components or update current routes and the application will automatically update the routes config during build.\n\n## Installation\n```bash\nnpm i -D @aofl/@aofl/templating-plugin\n```\n\n## Usage\n```javascript\nconst AofLTemplatingPlugin = require('@aofl/templating-plugin');\n\n...\n  plugins: [\n    ...\n    new AofLTemplatingPlugin({\n      template: {\n        name: 'main',\n        template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n        filename: path.join('templates', 'main', 'template.html'),\n        ...{ other html-webpack-plugin options }\n      },\n      routes: {\n        mainRoutes: path.join(__dirname, '..', 'routes'),\n        pattern: [\n          path.join(__dirname, '..', 'routes', 'home', 'index.js')\n        ],\n        ignore: ['**/__build/**/*', '**/node_modules/**/*']\n      }\n    }),\n    ...\n  ]\n...\n```\n\n## Options\n| Name      | Type   | Default                                                                                                          | Description                                                                                                                         |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| template  | Object | {}                                                                                                               | html-webpack-plugin options plus a `name` attribute that will be part of the route object.                                          |\n| routes    | Object | {}                                                                                                               | Define route entry points. `mainRoutes`, `pattern` and optional `ignore`.                                                           |\n| partials  | Object | {}                                                                                                               | Used to define static partial templates object where the keys are the partials name and the values are html-webpack-plugin options. |\n| locale    | String | en-US                                                                                                            | Default locale for entry points.                                                                                                    |\n| prerender | Object | ` {   timeout: 0,   externalServer: false,   schema: 'http',   host: 'localhost',   port: 8090 }` | Add timeout in ms on top of the when there are no more than 2 network connections for at least 500 ms.                              |\n\n### template\nThe `template` object is used with html-webpack-plugin to generate the html for the entry points. In addition to the html-webpack-plugin options you must specify a name for the template. This attribute will be part of the generated routes config object.\n\n```javascript\n    ...\n      new AofLTemplatingPlugin({\n        template: {\n          name: 'main',\n          template: path.resolve(__dirname, '..', 'templates', 'main', 'template.ejs'),\n          filename: path.join('templates', 'main', 'template.html'),\n          ...htmlWebpackConfig(mode)\n        }\n        ...\n```\n\n### routes\n`routes` is used to find the routes entry files. We can have multiple routes folders but only one of these folders can be the `mainRoutes`. `mainRoutes` will be under `routes` key in the generated routes config. Any other `routes-[anything here]` folder will be added to the routes configs under `[anything here]` key. These routes can be used for (A/B testing).\n\n```javascript\n  ...\n    routes: {\n      mainRoutes: path.join(__dirname, '..', 'routes'),\n      pattern: [\n        path.join(__dirname, '..', 'routes', 'other', 'index.js'),\n        path.join(__dirname, '..', 'routes-a', 'home', 'index.js')\n      ],\n      ignore: ['**/__build/**/*', '**/node_modules/**/*']\n    }\n  ...\n```\n\n### locale\n`options.locale` specifes the default locale for the application. Each route can specify a locale in the route annotations as explained below.\n\n### partials\nStatic parial templates can be defined using partials key and can be added to template using template variables `aoflTemplate:partial:[partial-name]`. For Example, header and footer areas. Partials should be html-webpack-plugin options.\n\n```javascript\n// webpack.config.js\n...\n  partials: {\n    header: {\n      template: path.join(__dirname, '..', 'js', 'header', 'view.ejs'),\n      filename: path.join('js', 'header', 'view.html'),\n      ...other-html-webpack-plugin-options\n    }\n  }\n...\n```\n\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n### prerender\n`options.prerender` allows for customizing the prerender server.\n\n## Template Keywords\n\n### aoflTemplate:locale\n\n```html\n<!DOCTYPE html>\n<html lang=\"aoflTemplate:locale\">\n  ...\n```\n\n### aoflTemplate:title\n```html\n<html lang=\"aoflTemplate:locale\">\n  <head>\n    <title>aoflTemplate:title</title>\n    ...\n```\n\n### aoflTemplate:metaTags\n```html\n <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    aoflTemplate:metaTags\n    ...\n```\n### aoflTemplate:parial:[partial-name]\n```html\n<!-- template.ejs -->\n...\n<body>\n  aoflTemplate:partial:header\n  ...\n```\n\n## Route Annotation\n@aofl/templating plugin generates the routes.config.js file based on comment blocks found in the index.js file of the routes.\n\n\n```javascript\n/**\n * @route /\n * @title AofL::Home::CN\n * @metaTag {name:\"description\", content=\"Our awesome homepage\"}\n * @metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}\n * @meta {\n *   debug: false,\n *   template: 'main',\n *   requiresAuthentication: true\n * }\n * @prerender false\n * @locale zh-CN\n */\n\nimport template from './template';\nimport styles from './styles.css';\nimport AoflElement from '@aofl/web-components/aofl-element';\n/**\n * @extends {AoflElement}\n */\nclass CnZhHomePage extends AoflElement {\n  ...\n\n```\n\nSupported Tags\n| Name       | Type   | Description                                                                                                                                                 |\n|------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| @route     | String |                                                                                                                                                             |\n| @title     | String | Title of the page                                                                                                                                           |\n| @metaTag   | Object | Define a meta tag for the route. Multiple @metaTags can be used on a page. E.g. `@metaTag {name:\"viewport\", content:\"width=device-width, initial-scale=1\"}` |\n| @meta      | Object | Application specific route meta data.                                                                                                                       |\n| @locale    | String | Route specific locale. This value overrides the locale specified in the config.                                                                             |\n| @prerender | String | Specifies whether the page should be pre-rendered during production build.                                                                                  |\n\n## example @aofl/unit-testing-plugin/routes.config.js\n```javascript\nexport default {\n  'routes': [\n    {\n      'resolve': () => import('./routes-cn_zh/home/index.js'),\n      'rotation': 'routes',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::CN',\n      'meta': {\n        'debug': false,\n        'template': 'main',\n        'requiresAuthentication': true,\n      },\n      'locale': 'zh-CN',\n      'template': 'main'\n    },\n    {\n      'resolve': () => import('./routes-cn_zh/login/index.js'),\n      'rotation': 'routes',\n      'path': '/login/',\n      'dynamic': false,\n      'title': 'AofL::Login::CN',\n      'locale': 'zh-Cn',\n      'template': 'main'\n    }\n  ],\n  'b-test': [\n    {\n      'resolve': () => import('./routes-b-test/home/index.js'),\n      'rotation': 'b-test',\n      'path': '/',\n      'dynamic': false,\n      'title': 'AofL::Home::B',\n      'locale': 'zh-CN',\n      'template': 'main'\n    }\n  ]\n};\n\n```\n","readmeFilename":"README.md"}