{"_id":"egg-view","_rev":"941856","name":"egg-view","description":"Base view plugin for egg","dist-tags":{"latest":"2.1.4","release-1.x":"1.2.0","release-2.x":"2.1.4"},"maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"time":{"modified":"2026-09-14T01:23:18.000Z","created":"2017-02-20T14:34:51.537Z","2.1.4":"2023-02-03T03:51:48.261Z","2.1.3":"2020-11-05T08:14:31.181Z","2.1.2":"2019-01-30T10:18:52.887Z","2.1.1":"2018-12-29T09:35:43.102Z","1.2.0":"2018-03-14T09:44:57.466Z","2.1.0":"2018-02-26T08:40:14.745Z","2.0.0":"2017-11-13T01:42:43.969Z","1.1.2":"2017-07-14T07:52:27.503Z","1.1.1":"2017-06-04T15:02:32.964Z","1.1.0":"2017-04-01T11:45:49.132Z","1.0.1":"2017-02-28T12:54:43.326Z","1.0.0":"2017-02-20T14:34:51.537Z"},"users":{},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"versions":{"2.1.4":{"name":"egg-view","version":"2.1.4","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"@eggjs/tsconfig":"^1.0.0","@types/node":"^16","autod":"^3.1.2","coffee":"^5.4.0","egg":"^2.14.2","egg-bin":"^4","egg-ci":"^1","egg-mock":"^4.2.1","eslint":"^4","eslint-config-egg":"5","mz-modules":"^1.0.0","typescript":"^4.7.3"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"types":"index.d.ts","ci":{"version":"8, 10, 12, 14, 16","type":"github"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"0f4e16afb723aa4756d30a4315bebeafd464b175","_id":"egg-view@2.1.4","_nodeVersion":"18.13.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-8zJ/S7YU5SK3EbAYESlUCixLpDZPnyKimoowavrgW2vONnh8AJVuDGqgKCYmuymvWq3uaHoNx7mYbdMQwMTZ6A==","shasum":"c583b62f6d320eee9470dcbd1de42a6ca1d425be","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.1.4.tgz","fileCount":11,"unpackedSize":22581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICH/xjrJF1szOoUD9LMhPSIaYe2gI6nUH+FKIa3LKa0uAiAL1b7zcfVmj+96cJJ2F8KppiuGTTBszNgVLcf7ri80cQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3ITUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDDQ/6AoCSvrWtrby3fwcZqJQSYnNop255LCDikQ8sVRcSL86+HgCi\r\nzfCccOdKhOdmVijZS5SY5tZRnJoW560xa0gZqYlszlqLH02SWZ9MjQJZvarU\r\nwf0nvY1Fiu47WH1e17bgtcYPj5slBmSbxBk/amBtOqStj02QgnN2aFfyO3zb\r\nfEs3taefDtslgl12Wkf+bhsFbbWM+uHjB7hkrPsEFgPblyF85wHVkhcUHD7F\r\nn48bp3JKgc7ZOaZeBQ3uf5QV4FjIF2VozdcjSYaP2Gux8Znx7nO77FQqeGfR\r\nzDHWXr+r39BpToDSXxUtJhI7Vs5ZE++PBVUaG3ryQTN1ijuU4jabMK+CDwGr\r\ntgQiuR9iJr/5JHUZ/3O4A6pKc0N9xeZaCRSsHT8ZovTaxlNPphFIPz2KMLDF\r\nYiQsyl8ejLRUWfDkr8dYX6UNT6iGNbuu9QGkgrwwB9ztZjNVE7YsLoDssRfM\r\nE57QUB2iB3vMWOM61e2kftCVJIxoKTJgSOAIUJT5WucKmOsLm8yFoLpQ+JxD\r\nJ/UZu99SCTJG4G8ifPA/JP6PFmMoYWeKwn06gzvXqGJ82IrV+lwvdUnG0y3v\r\nXIpD/aCMUyR0tB0yd/c0mscL0iwxxaL1eNwjxcFwB1673YNMEUYmOdmjyZcX\r\n5CAJqeoHCuDVdOkgJLl8a4z0vFpi0fzqEwo=\r\n=LQFt\r\n-----END PGP SIGNATURE-----\r\n","size":7373,"noattachment":false,"key":"/egg-view/-/egg-view-2.1.4.tgz"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_2.1.4_1675396308071_0.4894085045775405"},"_hasShrinkwrap":false,"publish_time":1675396308261,"_cnpm_publish_time":1675396308261},"2.1.3":{"name":"egg-view","version":"2.1.3","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"@types/node":"^10.12.18","autod":"^2.10.1","coffee":"^5.2.0","egg":"^2.14.2","egg-bin":"^4.3.5","egg-ci":"^1.11.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","mz-modules":"^1.0.0","typescript":"^3.2.2","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"types":"index.d.ts","ci":{"version":"8, 10, 11"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"06639ec1e4977f4898c88f04d19efe823de20fcd","_id":"egg-view@2.1.3","_nodeVersion":"12.19.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-mFZRuyVodCbt9KxfYbmlVa3iH1B+346pnjGv5isxeiEtu3hn9gNSuiS9me5AqscUtAuN1SsmJPHW9IA9qQ6DYw==","shasum":"06833bfd588ce7819c0f976f04c02e506a77dd4d","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.1.3.tgz","fileCount":11,"unpackedSize":22124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo7RnCRA9TVsSAnZWagAAOc0QAII8/syZW9MsTRaydyHW\n+NTgPd6ESpzv9R6pCc4TdRuDbrcjA1krTNZGOY2K/RU9nISpxueaXCXrXPnX\nvN20rClOx5EtGqk+sXrnmXNGNRWggG4Vx8Z+BPMMhOfNwe+0ZfHrsPeONYY8\nhhj0JzHWA001bvi8AIXFQQm0CoaX52u6PhytVYUydwBlLcc0dp/J4rhUW0n2\nEQhvIFSGjjm4eiIoALgenOzAPiYRyu9Tqg6ySGVDaQbqy1JXD1Cj+V5JKr9c\nn2Siq382pbZ3r62NehCJEoCSAD55rWEdeWQVcjaBhRAOe5YHqpY9IS2kptY7\nK2WV2N+wHbfxpMA4n+4pyyhOTpEaCP7I61aP6uhuaVbkUzBvX72JGYNHrB9n\nPsu9sMMw4UTyc+9k7PBBbtRRXlbWnsAnEBr8L6P86EbATIhySRyJtphy2PVO\nEZvH7pSZg024puK05fAeOwXjs8GfdYF+Yc56oKHYyWS4XhBtCX3cEzHnvysy\nu06Y1ZVSFdnQb4QWyMa3YIeeh5PcNGc+z0ro1zdJYB+VnoRQHqZLds4/wOau\nkZ+tgCVWdUlEmLEtY9RzQtpdgyY2DMgHs0vKHTjrSFSLUtfP/35m6Nh+W6V9\ntNAU6V5JbCneUEBKJL+W6TDo3h6D6Sy6CHXNjc573+3T/XQYJuh2B5k1bMXJ\nUBw3\r\n=TL4M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlcKfuZECvlp/eYJ57QUknYD5DWoyoKl3/X+10mjsH/QIgRuqpABgUTBGPA6x7krrdok48gHk6mcGu+SRnhcmZK4U="}],"size":7239,"noattachment":false,"key":"/egg-view/-/egg-view-2.1.3.tgz"},"_npmUser":{"name":"atian25","email":"atian25@qq.com"},"directories":{},"maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_2.1.3_1604564071071_0.44217981159486963"},"_hasShrinkwrap":false,"publish_time":1604564071181,"_cnpm_publish_time":1604564071181},"2.1.2":{"name":"egg-view","version":"2.1.2","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"@types/node":"^10.12.18","autod":"^2.10.1","coffee":"^5.2.0","egg":"^2.14.2","egg-bin":"^4.3.5","egg-ci":"^1.11.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","mz-modules":"^1.0.0","typescript":"^3.2.2","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"types":"index.d.ts","ci":{"version":"8, 10, 11"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"656a098d9cdc2dff8aa9ba3f70df37977991c26a","_id":"egg-view@2.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atian25","email":"atian25@qq.com"},"dist":{"integrity":"sha512-C/EpRwjcstv/qaOJtpphNKeCgjd7AbHayqirY65eICG+0EaH4EiFUoh4b1WhIBiYNJHoV/DkkAW78Uiyr+XkEA==","shasum":"144698b23d1b187e1764e5edceae1819810d7a1f","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.1.2.tgz","fileCount":11,"unpackedSize":22081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUXoNCRA9TVsSAnZWagAAUHsP/RBfsXPmQCv8F34AyBMY\nqaydaFTEzIh9gPdEjx8VFUGppEu+OR4ajuMzovDkDdmT0LYOSbi1Ud6lfnYg\nHn2c0JIXxLnpuoocsfw05iL/HFyW3N8AOUHVEpwo4ZaabHZOP0oBhCazS/Hl\n471UoUSXpwdEs+pfTVtCqydV2HWyg4Dqp6T04zd3Hc/vSpK+EAFoihcW9ue7\nJ1/40kCIrhoRo2SCrWjFgr8cwUjPCeujVka7HcyIbWmVzpZ/jPJwwkU7ad73\nFhiZe8IxIo35vlWWKdvuLBa1sXnzVGTdANHiO1vXt7TubGPmUBa9qKblT1CA\nBci34dj0BMHC2F1nHoL/0Vtz8A2wsPAZhAZ/sZi5i/m0HdFrKWBj4am/HDy0\nfsofUyIxHasDe0GKNSLMcm2CoM7/BW9PMDSSvke9tAmeTAtlWuK7c01C+Nfu\nV22PjNjLX077uISdnyEskcpNGxZAsbfwaiVT6J73PkkAhyj+WOQ/A2LKC9vV\niqOP3p8MHuL0a/eyXwand2bjIG7OxpW8sawlHSeaijMVWEN48qtxQqRbwDqz\nIr1yADGUW0MPVqOfIJL/qZKD9VzKZ3FKqHBQUasvP2GPX1WXi3BUmZQ3amm9\nZtCzUtHBSSnSR5KQtTCsEEuuPR9k3ec0gSchWd4mgnd868HU2pq4WyZuZpiB\n6dcO\r\n=Qv9g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8g+E6sdzMXtWm1Kleedwebl6OgMN/nvxDDA44OSSYXwIhAIeGVvYQYlKE1uUaYaxtzx77qy0NU88GquJqZYkQYffs"}],"size":6994,"noattachment":false,"key":"/egg-view/-/egg-view-2.1.2.tgz"},"maintainers":[{"email":"atian25@qq.com","name":"atian25"},{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"sakura9515@gmail.com","name":"popomore"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_2.1.2_1548843532768_0.17765494412713934"},"_hasShrinkwrap":false,"publish_time":1548843532887,"_cnpm_publish_time":1548843532887},"2.1.1":{"name":"egg-view","version":"2.1.1","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"autod":"^2.10.1","coffee":"^5.2.0","egg":"^2.14.2","egg-bin":"^4.3.5","egg-ci":"^1.11.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","mz-modules":"^1.0.0","typescript":"^3.2.2","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"types":"index.d.ts","ci":{"version":"8, 10, 11"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"3d9d6b092dc1f384455bb591cca75c9c60f69d80","_id":"egg-view@2.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atian25","email":"atian25@qq.com"},"dist":{"integrity":"sha512-95M3I0HJ3m/5j3qED4z4N5r+6USxEaTVaG//G4ZQYRt+G1WbzFPtBoAezsCbzfIJm/iO6gkFxgEleSDuxJOx4Q==","shasum":"46684edb5bd6bfa65e3f234617dd8d939bd7fed8","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.1.1.tgz","fileCount":11,"unpackedSize":22008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJz/vCRA9TVsSAnZWagAAX7sQAJMepSKXyaLRh7B3EPb6\nr7XqrooNAkqe4P2m95FYvzmUoN56708ntXCgDDzfA1qisg5FN8wgbohkgw/R\nDGxZfwGaUwAvlP2B+QNOSgw+P0UUKQykWSUW0bV7ad+aoZmrvZBCZUhZuClM\nR60uh7yCl4goNmAyCHy/x5SoxboOuOZVaosy5Yv3qYdv4YS0J42gsl5DFnhZ\n2kB2pQHO884CHDFPE2a6mOzZERXOxMvucWZwRFuR9zL/Iv9Ahbk2sW7goMen\nnerYxlQjLuVHQ5zmT0PxvtqjoV5x5o11f5mDlADfK8oh+4QuFS6wkXapXNhV\nzp8nQLfHMMljEyB6ttu8zuqKb6/ac5OvGLOd8SRUXnFSgDoWpWcVuA61WyRo\newrd/9fPnTyQp9WR7Oc/+j9MXmmRR63867PB5S5nsH5T9Jn7XZzCE9lYJT0J\n5RIHM0tRQCIecuzB+bJ+tdUjC6YDq+eobEp584JwoVMSD0EJ8/3bJ/34wsWb\nbenNLIo38qkXZJzt+ON0PeiHk4xIG5G5GQiAm4b4PBXidGlogT3URznl0s9W\n5+92x6UlV8ywiLXxjuPSbN97FHtTLjiRvVpYtKRywWvzKSmGK4tXwI1gNRk8\ncFghucBuMtPqD2p97iGSByN3UBFBf3x4guSDK2P7XXs7FbYGLc9WTJkgS9ZL\njOGT\r\n=U6g3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDnR/LTYt/mGM4CnFRdF9kb1phdweDwLHLxl4qWEX4Y5AiBvIEQFxGZ0wh1B4eLNAy/jFW7NTCJNeNs3kHRZofn7kA=="}],"size":6959,"noattachment":false,"key":"/egg-view/-/egg-view-2.1.1.tgz"},"maintainers":[{"email":"atian25@qq.com","name":"atian25"},{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"sakura9515@gmail.com","name":"popomore"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_2.1.1_1546076142954_0.8209852939512976"},"_hasShrinkwrap":false,"publish_time":1546076143102,"_cnpm_publish_time":1546076143102},"1.2.0":{"name":"egg-view","version":"1.2.0","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.0.0","egg-bin":"^3.1.0","egg-ci":"^1.6.0","egg-mock":"^3.2.0","eslint":"^3.18.0","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","publishConfig":{"tag":"release-1.x"},"readmeFilename":"README.md","gitHead":"91fbd025fa6dc51d86e0fbedeb8e2e902e18023a","_id":"egg-view@1.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-l0v+QDuesqtlnoRT0JbkhAHMgE3YwP8qDtFkouyHNWj1gSrl9xA2OGTJzWk9y/kCbUAaW0GCk4sVy9izVCBJoA==","shasum":"6c69ef42904318b0880b44bd43e5aa413cbc5e89","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.2.0.tgz","fileCount":10,"unpackedSize":18910,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHoXYaY1Sye+a9fQR+rG1TTzBUCLlADAqm4k+Rzn1CTrAiEA3Bxx7rX+g+VF6kSRETq7vl3+rXQIo35gcKSAvmBkML8="}],"size":6436,"noattachment":false,"key":"/egg-view/-/egg-view-1.2.0.tgz"},"maintainers":[{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"sakura9515@gmail.com","name":"popomore"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_1.2.0_1521020697389_0.4653744706047769"},"_hasShrinkwrap":false,"publish_time":1521020697466,"_cnpm_publish_time":1521020697466},"2.1.0":{"name":"egg-view","version":"2.1.0","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"autod":"^2.10.1","egg":"next","egg-bin":"^4.3.5","egg-ci":"^1.8.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","mz-modules":"^1.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"8, 9"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"4d5bf9b18ea6438510fabb066ead4897d783c2f9","_id":"egg-view@2.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-6UA6ZOqtlm3BWMTcLgWV2FkZVHEpEB73bL00w3NqOhfyDBwW35DfbHYu6cwLTwJYiA9WQvneve99PMBWcePM6g==","shasum":"aa7ca0344213f5d72147d6001bc0503f858b425c","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.1.0.tgz","fileCount":10,"unpackedSize":19231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP0Jf3fKPWyb5FfP+BxqiTn+l86jM5k4XZm8S2ApXF1wIgGu87bBh4QOX9ZNxubP6XN7/9SuyA9AAOjZcrRPI9qXU="}],"size":6574,"noattachment":false,"key":"/egg-view/-/egg-view-2.1.0.tgz"},"maintainers":[{"email":"dead_horse@qq.com","name":"dead-horse"},{"email":"sakura9515@gmail.com","name":"popomore"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view_2.1.0_1519634414683_0.7400417723230222"},"_hasShrinkwrap":false,"publish_time":1519634414745,"_cnpm_publish_time":1519634414745},"2.0.0":{"name":"egg-view","version":"2.0.0","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"mz":"^2.7.0"},"devDependencies":{"autod":"^2.10.1","egg":"next","egg-bin":"^4.3.5","egg-ci":"^1.8.0","egg-mock":"^3.13.1","eslint":"^4.10.0","eslint-config-egg":"^5.1.1","mz-modules":"^1.0.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=8.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"8, 9"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"39937df48e9ee4a10c1a5ec019d9295fa42960c9","_id":"egg-view@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-GddzSt1bXbLLTasjuQUeJg5LxjYRbystMiTtoNt6/xqJ7xuCAI5GrnPnK8KTmNSnn5uUP4F92wMQcL439CVX4Q==","shasum":"a83904074a31fd76afaa0a42453f0778c26b2276","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoKbF/wLmxrP8HqpHHpvL5plj0azlwlLzfgNPylAfSGAIhAMz3JvDjDVTgaiW0kepgGdk+R0TjsVAJIjj4AskrB0Lh"}],"size":6447,"noattachment":false,"key":"/egg-view/-/egg-view-2.0.0.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view-2.0.0.tgz_1510537363898_0.6686005257070065"},"directories":{},"publish_time":1510537363969,"_cnpm_publish_time":1510537363969},"1.1.2":{"name":"egg-view","version":"1.1.2","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.0.0","egg-bin":"^3.1.0","egg-ci":"^1.6.0","egg-mock":"^3.2.0","eslint":"^3.18.0","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"fb008fea94b3538a55efda5075dfc42116b0f129","_id":"egg-view@1.1.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.3","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-ZLGArvUR+lNfdTWeDykPespwXbxxLkF8Ib5uCWUVBj4V7HP2k+93t8x/o0OBG4f32s57E5jpP7YGufnR03uO1w==","shasum":"8fe735aa520546b920cdc9b382682f63ec21066e","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZH07FUGOFHq7MCLlqfvWc1xnV/DLYiTDnFUVrovAGLAiBorcmPX+6itoqreV+zRY7geXm1HsblVoZlNqzRIHb4Bw=="}],"size":6289,"noattachment":false,"key":"/egg-view/-/egg-view-1.1.2.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view-1.1.2.tgz_1500018747340_0.3164524829480797"},"directories":{},"publish_time":1500018747503,"_cnpm_publish_time":1500018747503},"1.1.1":{"name":"egg-view","version":"1.1.1","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.0.0","egg-bin":"^3.1.0","egg-ci":"^1.6.0","egg-mock":"^3.2.0","eslint":"^3.18.0","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"c633fbe5cd1bdb7e3577fcf4680922a39b2f0d5a","_id":"egg-view@1.1.1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-O8yQEkcEsGDmzV3qdQRJg1KYxaHfVHWQqNdvrXaQxbaCLJniuXNiIsYXMuvXMMtH8/ouOSNUuSj4QLVKn29XMQ==","shasum":"d8533195ac091a00b6a703c541b4b8c7ea9a42c5","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaxU2sBi+57xyeE4rzO06GDF6BgEHDbH5HBycP2fGwFAiEA2hB6SUCYIxRPl8yA0BA4FSjgbo7lNFcJxjqPWMX8CbA="}],"size":6211,"noattachment":false,"key":"/egg-view/-/egg-view-1.1.1.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/egg-view-1.1.1.tgz_1496588552729_0.4266971393954009"},"directories":{},"publish_time":1496588552964,"_cnpm_publish_time":1496588552964},"1.1.0":{"name":"egg-view","version":"1.1.0","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.8.0","egg":"^1.0.0","egg-bin":"^3.1.0","egg-ci":"^1.6.0","egg-mock":"^3.2.0","eslint":"^3.18.0","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","pkgfiles":"egg-bin pkgfiles"},"files":["app","lib","config"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"f6e65f471234c4028875317fd995e248777e0401","_id":"egg-view@1.1.0","_shasum":"09350169ecdf29085254348850400ce1b9fa5279","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"09350169ecdf29085254348850400ce1b9fa5279","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.1.0.tgz","integrity":"sha512-ojtPbyQlAg29Y2SKFn2xRUXx4HZ1vtn2ZQ6d3QcGa6jzmoJWGJtD0Syt0Uz6rQUDaAzS2BsBsF94qQk7ftc67g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6vdMA54c/TJUrMRsPCdSKe8OnrCSjC6UzZ9J1ciYjSwIhAK8xfPSFN4QjRJg4WiwDr2ItBTBEsd/oG9qLlyWWTbkA"}],"size":6178,"noattachment":false,"key":"/egg-view/-/egg-view-1.1.0.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/egg-view-1.1.0.tgz_1491047147248_0.4095231194514781"},"directories":{},"publish_time":1491047149132,"_cnpm_publish_time":1491047149132},"1.0.1":{"name":"egg-view","version":"1.0.1","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.7.1","egg":"^1.0.0-rc.1","egg-bin":"^2.2.3","egg-ci":"^1.2.0","egg-mock":"^3.0.1","eslint":"^3.16.1","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"files":["config","app","lib"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"5304002dea095800b5e030372b4cd1df0776d6be","_id":"egg-view@1.0.1","_shasum":"d82868f5661c8e28c96be18de0defd0668327651","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"d82868f5661c8e28c96be18de0defd0668327651","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.0.1.tgz","integrity":"sha512-gHin9plNuoqOOmiH+ef7s6z2BVqRE6KHmRPfPBbocJRQ1PmHBAAEBo0xSM4/DLCzGLUR7jKtTvapLmAvo0Trmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFXW4ixzsfetLMhaAc85UkXzwiNZ/JvUhEFoVJ8OTnYAIhAK/S6j5uMSnvCSGdeEicP8pb2SYtWSfwYaYqJPRPUGZF"}],"size":5973,"noattachment":false,"key":"/egg-view/-/egg-view-1.0.1.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/egg-view-1.0.1.tgz_1488286483054_0.5610813656821847"},"directories":{},"publish_time":1488286483326,"_cnpm_publish_time":1488286483326},"1.0.0":{"name":"egg-view","version":"1.0.0","description":"Base view plugin for egg","eggPlugin":{"name":"view"},"keywords":["egg","eggPlugin","egg-plugin","egg-view","view"],"dependencies":{"co":"^4.6.0","mz":"^2.6.0"},"devDependencies":{"autod":"^2.7.1","egg":"^0.12.0","egg-bin":"^2.2.1","egg-ci":"^1.1.0","egg-mock":"^3.0.0","eslint":"^3.15.0","eslint-config-egg":"^3.2.0","mz-modules":"^1.0.0","supertest":"^3.0.0","webstorm-disable-index":"^1.1.2"},"engines":{"node":">=6.0.0"},"scripts":{"test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"files":["config","app","lib"],"ci":{"version":"6, 7"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg-view.git"},"bugs":{"url":"https://github.com/eggjs/egg/issues"},"homepage":"https://github.com/eggjs/egg-view#readme","author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"2f663d39db4b478bb7f8655271732b578d8502cc","_id":"egg-view@1.0.0","_shasum":"e9085bff61914e9272ce30b2882d38e67bec8dd9","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"e9085bff61914e9272ce30b2882d38e67bec8dd9","tarball":"http://registry-npm.ywwl.com/egg-view/download/egg-view-1.0.0.tgz","integrity":"sha512-6cQ0v9bwJt8XaWieX2guXSo0RlviPftOQnrVLI6QRx3H6Aa+0VOzh/RnI9Sxrl0SfcJChb7w52NVpT7qtbexvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEtmR0xD08K022fqKhQgi4JJQDwwU9cLxd7vOomvHsRAiEAr2Efq7Ka25Qxs0OC/EkjhLilfo2eq1j1vfYz0JuezWk="}],"size":5858,"noattachment":false,"key":"/egg-view/-/egg-view-1.0.0.tgz"},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/egg-view-1.0.0.tgz_1487601291305_0.1758509292267263"},"directories":{},"publish_time":1487601291537,"_cnpm_publish_time":1487601291537}},"readme":"# egg-view\n\n[![NPM version](https://img.shields.io/npm/v/egg-view.svg?style=flat-square)](https://npmjs.org/package/egg-view)\n[![NPM quality](http://npm.packagequality.com/shield/egg-view.svg?style=flat-square)](http://packagequality.com/#?package=egg-view)\n[![NPM download](https://img.shields.io/npm/dm/egg-view.svg?style=flat-square)](https://npmjs.org/package/egg-view)\n\n[![Continuous Integration](https://github.com/egg/egg-view/actions/workflows/nodejs.yml/badge.svg)](https://github.com/egg/egg-view/actions/workflows/nodejs.yml)\n[![Test coverage](https://img.shields.io/codecov/c/github/egg/egg-view.svg?style=flat-square)](https://codecov.io/gh/egg/egg-view)\n\n\nBase view plugin for egg\n\n**it's a plugin that has been built-in for egg.**\n\n## Install\n\n```bash\n$ npm i egg-view --save\n```\n\n## Usage\n\n```js\n// {app_root}/config/plugin.js\nexports.view = {\n  enable: true,\n  package: 'egg-view',\n};\n```\n\n## Use a template engine\n\n[egg-view] don't have build-in view engine, So you should choose a template engine like [ejs], and install [egg-view-ejs] plugin.\n\nYou can choose a template engine first, link [ejs], so we use [egg-view-ejs] plugin.\n\n`egg-view` is in [eggjs], so you just need configure [egg-view-ejs].\n\n```js\n// config/plugin.js\nexports.ejs = {\n  enable: true,\n  package: 'egg-view-ejs',\n};\n```\n\nConfigure the mapping, the file with `.ejs` extension will be rendered by ejs.\n\n```js\n// config/config.default.js\nexports.view = {\n  mapping: {\n    '.ejs': 'ejs',\n  },\n};\n```\n\nIn controller, you can call `ctx.render`.\n\n```js\nmodule.exports = app => {\n  return class UserController extends app.Controller {\n    async list() {\n      const { ctx } = this;\n      await ctx.render('user.ejs');\n    }\n  };\n};\n```\n\nIf you call `ctx.renderString`, you should specify viewEngine in viewOptions.\n\n```js\nmodule.exports = app => {\n  return class UserController extends app.Controller {\n    async list() {\n      const { ctx } = this;\n      ctx.body = await ctx.renderString('<%= user %>', { user: 'popomore' }, {\n        viewEngine: 'ejs',\n      });\n    }\n  };\n};\n```\n\n## Use multiple view engine\n\n[egg-view] support multiple view engine, so you can use more than one template engine in one application.\n\nIf you want add another template engine like [nunjucks], then you can add [egg-view-nunjucks] plugin.\n\nConfigure the plugin and mapping\n\n```js\n// config/config.default.js\nexports.view = {\n  mapping: {\n    '.ejs': 'ejs',\n    '.nj': 'nunjucks',\n  },\n};\n```\n\nYou can simply render the file with `.nj` extension.\n\n```js\nawait ctx.render('user.nj');\n```\n\n## How to write a view plugin\n\nYou can use [egg-view]' API to register a plugin.\n\n### View engine\n\nCreate a view engine class first, and implement `render` and `renderString`, if the template engine don't support, just throw an error. The view engine is context level, so it receive ctx in `constructor`.\n\n```js\n// lib/view.js\nmodule.exports = class MyView {\n  constructor(ctx) {\n    // do some initialize\n    // get the plugin config from `ctx.app.config`\n  }\n\n  async render(fullpath, locals) {\n    return myengine.render(fullpath, locals);\n  }\n\n  async renderString() { throw new Error('not implement'); }\n};\n```\n\n`render` and `renderString` support generator function, async function, or normal function return a promise.\n\nIf the template engine only support callback, you can wrap it by Promise.\n\n```js\nclass MyView {\n  render(fullpath, locals) {\n    return new Promise((resolve, reject) => {\n      myengine.render(fullpath, locals, (err, result) => {\n        if (err) {\n          reject(err);\n        } else {\n          resolve(result);\n        }\n      });\n    });\n  }\n};\n```\n\nThese methods receive three arguments, `renderString` will pass tpl as the first argument instead of name in `render`.\n\n`render(name, locals, viewOptions)`\n\n- name: the file path that can resolve from root (`app/view` by default)\n- locals: data used by template\n- viewOptions: the view options for each render, it can override the view default config in `config/config.default.js`. Plugin should implement it if it has config.\n  When you implement view engine, you will receive this options from `render`, the options contain:\n  - root: egg-view will resolve the name to full path, but seperating root and name in viewOptions.\n  - name: the original name when call render\n  - locals: the original locals when call render\n\n`renderString(tpl, locals, viewOptions)`\n\n- tpl: the template string instead of the file, using in `renderString`\n- locals: same as `render`\n- viewOptions: same as `render`\n\n### Register\n\nAfter define a view engine, you can register it.\n\n```js\n// app.js\nmodule.exports = app => {\n  app.view.use('myName', require('./lib/view'));\n};\n```\n\nYou can define a view engine name, normally it's a template name.\n\n### Configure\n\nDefine plugin name and depend on [egg-view]\n\n```json\n{\n  \"eggPlugin\": {\n    \"name\": \"myName\",\n    \"dependencies\": [ \"view\" ]\n  }\n}\n```\n\nSet default config in `config/config.default.js`, the name is equals to plugin name.\n\n```js\nexports.myName = {},\n```\n\nSee some examples\n\n- [egg-view-ejs]\n- [egg-view-nunjucks]\n\n## Configuration\n\n### Root\n\nRoot is `${baseDir}/app/view` by default, but you can define multiple directory, seperated by `,`. [egg-view] will find a file from all root directories.\n\n```js\nmodule.exports = appInfo => {\n  const baseDir = appInfo.baseDir;\n  return {\n    view: {\n      root: `${baseDir}/app/view,${baseDir}/app/view2`\n    }\n  }\n}\n```\n\n### defaultExtension\n\nWhen render a file, you should specify a extension that let [egg-view] know whitch engine you want to use. However you can define `defaultExtension` without write the extension.\n\n```js\n// config/config.default.js\nexports.view = {\n  defaultExtension: '.html',\n};\n\n// controller\nmodule.exports = app => {\n  return class UserController extends app.Controller {\n    async list() {\n      const { ctx } = this;\n      // render user.html\n      await ctx.render('user');\n    }\n  };\n};\n```\n\n### viewEngine and defaultViewEngine\n\nIf you are using `renderString`, you should specify viewEngine in view config, see example above.\n\nHowever, you can define `defaultViewEngine` without set each time.\n\n```js\n// config/config.default.js\nexports.view = {\n  defaultViewEngine: 'ejs',\n};\n```\n\nsee [config/config.default.js](https://github.com/eggjs/egg-view/blob/master/config/config.default.js) for more detail.\n\n## Questions & Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues).\n\n## License\n\n[MIT](https://github.com/eggjs/egg-view/blob/master/LICENSE)\n\n\n[eggjs]: https://eggjs.org\n[ejs]: https://github.com/mde/ejs\n[egg-view-ejs]: https://github.com/eggjs/egg-view-ejs\n[egg-view]: https://github.com/eggjs/egg-view\n[nunjucks]: http://mozilla.github.io/nunjucks\n[egg-view-nunjucks]: https://github.com/eggjs/egg-view-nunjucks\n","_attachments":{},"homepage":"https://github.com/eggjs/egg-view#readme","bugs":{"url":"https://github.com/eggjs/egg/issues"},"license":"MIT"}