{"_id":"beidou-view-react","_rev":"31-0a1fe97d43196302d84d834c9680512a","name":"beidou-view-react","dist-tags":{"latest":"2.3.0","next":"2.0.0-beta.0"},"versions":{"0.3.5":{"name":"beidou-view-react","version":"0.3.5","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","ci":"npm run cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"is-generator-function":"^1.0.6","js-beautify":"^1.6.2","normalizeurl":"^1.0.0","serialize-javascript":"^1.3.0","beidou-view":"^0.0.1"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"autod":"2","egg":"^2.2.0","egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1","webpack":"^3.10.0"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@0.3.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-nMS82Oqz94vZRFrrImdmrq5CS1kxP2uPLS9U2GBlkzseZJKxVP6+RgsSaxhrkLNBELOYZm9YAuA70AkLte0Nkw==","shasum":"542e8f5f36d0274e41398f6c0d43f3c887a692a6","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-0.3.5.tgz","fileCount":9,"unpackedSize":5870,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5BdsTUyGN3B1EMIqjtUOVB0+k3vhr8iLpNH0AfrqJGAiBPqOSA0MeQBd8zYUiaMxknaG7Tr4dynjyvFMWtJcay3g=="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_0.3.5_1518141464266_0.12977059709711947"},"_hasShrinkwrap":false},"1.0.0-alpha.1":{"name":"beidou-view-react","version":"1.0.0-alpha.1","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","ci":"npm run cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-alpha.1","is-generator-function":"^1.0.6","js-beautify":"^1.6.2","normalizeurl":"^1.0.0","serialize-javascript":"^1.3.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"autod":"2","egg":"^2.2.0","egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1","webpack":"^3.10.0"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_\n\n* [Beidou react view](#beidou-view-react-view)\n  * [Configuration](#configuration)\n  * [Usage](#usage)\n  * [API](#api)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Beidou react view\n\n> React view\n\n### Install\n\n```\n$ npm install beidou-view-react --save\n```\n\n### Configuration\n\n* config/plugin.default.js:\n\n```\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\n* config/config.default.js\n\n```\nexports.react = {\n  beautify: false // optional, beautify HTML snippet\n    cache: true, //optional, if false, clean require cache for development usage\n    internals: true, //optional, true: renderToString or false: renderToStaticMarkup\n    doctype: '<!DOCTYPE html>', //optional, HTML doctype\n}\n\nexports.view = {\n      defaultViewEngine: 'react',\n      defaultExtension: '.jsx'\n    }\n```\n\n### Usage\n\n```\n// app/controller/index.js\nexprots.index = function*() {\n  yield this.render('path/to/index.jsx', {\n    user: 'beidou view'\n  });\n};\n```\n\n### API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will `not` assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_id":"beidou-view-react@1.0.0-alpha.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-XtIrJ2+Pdmt/aNBjRi9bn4xs9jiHhnp6/Z+gjxq+18uuAhAxDFFJhbMnZ8daOJsXPO64MQRLoGjg8RKG55z1Cw==","shasum":"afe2b4ba128a9820d0cbd75bdc83113abe52c84e","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-alpha.1.tgz","fileCount":9,"unpackedSize":5886,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnaEPesO6RIghZtV/Zdr2wGPwTf0dfk8TBzxNvuTBpwAiEA2T2ZIEZjIXh3YjVzOo/sJxG8WX/NDsW203LIxIwzkb4="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-alpha.1_1518142145389_0.5167255187419832"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"beidou-view-react","version":"1.0.0-alpha.2","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","ci":"npm run cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-alpha.2","is-generator-function":"^1.0.6","js-beautify":"^1.6.2","normalizeurl":"^1.0.0","serialize-javascript":"^1.3.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"autod":"2","egg":"^2.2.0","egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1","webpack":"^3.10.0"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.0.0-alpha.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-XUnOWe3BLrcMZ1RoslUO8/OI6HSGvbE9pJHkOUd83lnFE6Hnwn3ezYxaGupfR0TH3ZThnfYN7bSeyt6+Jwgjtw==","shasum":"effb51985c52d4abd0d28ff0f5d708991603e7bf","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-alpha.2.tgz","fileCount":9,"unpackedSize":5914,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKo4trsclD1jwvxpv/0sYjGXq1h+pFGSmEObLZ3mGE2AiBFWR3AiL5epEKU4FamtPi+7Vfl6DbAuh9H8zvWWe+gzQ=="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-alpha.2_1518145433247_0.049059018262005205"},"_hasShrinkwrap":false},"1.0.0-alpha.3":{"name":"beidou-view-react","version":"1.0.0-alpha.3","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","ci":"npm run cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-alpha.3","react-redux":"^5.0.6"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_\n\n* [Beidou react view](#beidou-view-react-view)\n  * [Configuration](#configuration)\n  * [Usage](#usage)\n  * [API](#api)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Beidou react view\n\n> React view\n\n### Install\n\n```\n$ npm install beidou-view-react --save\n```\n\n### Configuration\n\n* config/plugin.default.js:\n\n```\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\n* config/config.default.js\n\n```\nexports.react = {\n  beautify: false // optional, beautify HTML snippet\n    cache: true, //optional, if false, clean require cache for development usage\n    internals: true, //optional, true: renderToString or false: renderToStaticMarkup\n    doctype: '<!DOCTYPE html>', //optional, HTML doctype\n}\n\nexports.view = {\n      defaultViewEngine: 'react',\n      defaultExtension: '.jsx'\n    }\n```\n\n### Usage\n\n```\n// app/controller/index.js\nexprots.index = function*() {\n  yield this.render('path/to/index.jsx', {\n    user: 'beidou view'\n  });\n};\n```\n\n### API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will `not` assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_id":"beidou-view-react@1.0.0-alpha.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-FvZdNZAuB6v+I2KGeiYuMcTj4HzZpuIy/gdOv2eKsd7585Hng9VBTB3444cHDkjNAxJu6e6KfXMMTDdtOU2ePg==","shasum":"13906d55d77a79554c55d010c3d12393b8f576af","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-alpha.3.tgz","fileCount":9,"unpackedSize":5719,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqwcPq+cGCSOhCkxgDTeh4wxMpQkw9rw8IgBh77J2ELAIgLe19iftwSfj4aya8N00VwXfGMiSGbs65yK3t79TfwSU="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-alpha.3_1518432723003_0.6048810022785658"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"beidou-view-react","version":"1.0.0-alpha.4","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-alpha.4"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readme":"<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_\n\n* [Beidou react view](#beidou-view-react-view)\n  * [Configuration](#configuration)\n  * [Usage](#usage)\n  * [API](#api)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n# Beidou react view\n\n> React view\n\n### Install\n\n```\n$ npm install beidou-view-react --save\n```\n\n### Configuration\n\n* config/plugin.default.js:\n\n```\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\n* config/config.default.js\n\n```\nexports.react = {\n  beautify: false // optional, beautify HTML snippet\n    cache: true, //optional, if false, clean require cache for development usage\n    internals: true, //optional, true: renderToString or false: renderToStaticMarkup\n    doctype: '<!DOCTYPE html>', //optional, HTML doctype\n}\n\nexports.view = {\n      defaultViewEngine: 'react',\n      defaultExtension: '.jsx'\n    }\n```\n\n### Usage\n\n```\n// app/controller/index.js\nexprots.index = function*() {\n  yield this.render('path/to/index.jsx', {\n    user: 'beidou view'\n  });\n};\n```\n\n### API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will `not` assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_id":"beidou-view-react@1.0.0-alpha.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-rHLs495u8BzdIa7yvuirT2pIQJV44UZEScdn+LEvdVc98kSm5PUs6podvkLJqyZDIoKkls5dWHj6icRHDgj5Fg==","shasum":"f7cc3fb2ae4eb597ba237da069e4b00cd8c0db14","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-alpha.4.tgz","fileCount":9,"unpackedSize":5617,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpMlD7cpmzjsKyE7tlE4n2yEEpZqqwke7viXWyry/YWAiEAmqHOH8Jr2Bzc0wfVHIlVQY7V3ML51HtPyDdmDuXA99c="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-alpha.4_1519471496979_0.5469491855736257"},"_hasShrinkwrap":false},"1.0.0-alpha.5":{"name":"beidou-view-react","version":"1.0.0-alpha.5","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-alpha.5"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nEnable plugin\n\n```js\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'doctype', 'beautify'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to log rendering time, you need to write a `time.js` to your `app/view-middlewares/`. If you don't understand middleware please read [egg-middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    // Recording time at begining\n    middlewares: [\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart [example project](../../examples/view-middleware/README.md) server to get the result\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may need access CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will `not` assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_id":"beidou-view-react@1.0.0-alpha.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"dist":{"integrity":"sha512-PguwLJjX15wnWPY8dviKfqHdQZf3jJpxeMOBu7BuptH9x8+Mlgq7Y7Liv/yeUREcKr93Ncu3ULt5R2enh1J/6w==","shasum":"b086f6d3edb302cd16c15d7bce0d19aac27b71e7","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-alpha.5.tgz","fileCount":9,"unpackedSize":7537,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCxOpM7rxk9Uf0EgLqSES7Sz6cVPU7Na8mHxhTAT9dRAIgV9NW5CBnzNidbGi+TflEob1rUnCDdfaKE4s1JvqUTIQ="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-alpha.5_1519896572923_0.9192217673539642"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"beidou-view-react","version":"1.0.0-beta.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-beta.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nEnable plugin\n\n```js\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '／build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to log rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [egg-middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    // Recording time at begining\n    middlewares: [\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart [view-middleware project](../../examples/view-middleware/README.md) server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may need access CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@1.0.0-beta.0","dist":{"shasum":"9e7fb928740fd59208ef9e4a0678fb4ed505f6eb","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-beta.0.tgz","fileCount":35,"unpackedSize":7566,"integrity":"sha512-qIAwfhk/ZCp6xopUpFpeHTBIXdQ8ZS3/G74IdkF5fbnLquFMOhVsfubyjOHGLgVkboQCbw3QeF10vhSdPTmf6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVGlYrhQAKL+bILdyxSVGY8gbnwRXu8TEMk2Xz9+uSLAIhAN/+MtCZy8VJA9mjvwLWZumS5gctBdrpgmBow6G3rW1D"}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-beta.0_1520595361304_0.868337908017889"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"beidou-view-react","version":"1.0.0-beta.1","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-beta.1"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nEnable plugin\n\n```js\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '／build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to log rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [egg-middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    // Recording time at begining\n    middlewares: [\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart [view-middleware project](../../examples/view-middleware/README.md) server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may need access CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@1.0.0-beta.1","dist":{"shasum":"4dd306109eb27507148ab5c50e288a4978173073","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-beta.1.tgz","fileCount":35,"unpackedSize":7566,"integrity":"sha512-YLSGs1TIAOWBFT5Uq1Xlt8NCKrDUKni8WG41eWjSgHhtpStrxXFUF7XtcPWlK6OU8CuosFfkGlmXcCc1vU/eGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHtPUxypALHQ78LzftQTnEsvJfBLabd9da9ovq6nN3xAiAo4joAnYOVITADJyG33YMRHWz4Kecp/tO5lt2dRryCrA=="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-beta.1_1520597528431_0.320427527255555"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"beidou-view-react","version":"1.0.0-beta.2","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-beta.2"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nEnable plugin\n\n```js\nexports.react = {\n  enable: true,\n  package: 'beidou-view-react',\n};\n```\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '／build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@1.0.0-beta.2","dist":{"shasum":"6a27efce0db5fbb2bed15a816a89202321624ca6","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-beta.2.tgz","fileCount":35,"unpackedSize":7574,"integrity":"sha512-01s4NSIMEqyyuKZ0c9pM7tX+n7Zqe/eqb/xPajtX+FqFd2KipdEnJyRWWUyh+0TbLBJNZ3PNPYWaLBrftInFFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGUeJXaIN/S0toWai0+uPkcCxXP0wAsS7IxOUTy+b9qHAiBSk7mUFzZ8UlTjyW/1ZZIdf9eMdetCw1gAfxnam4ptAQ=="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-beta.2_1521081301670_0.12041216828866519"},"_hasShrinkwrap":false},"1.0.0-beta.3":{"name":"beidou-view-react","version":"1.0.0-beta.3","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0-beta.3"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '／build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> * ctx.render(name, locals) - render template, and assign to ctx.body\n> * ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@1.0.0-beta.3","dist":{"shasum":"8c98d80b4e56be8ed8823901791970d01dfab428","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0-beta.3.tgz","fileCount":35,"unpackedSize":7479,"integrity":"sha512-VyenUBrNINy3AvEQ33MTjAUvKUgT9tc/9iah/oXzERymPMcIAJa7+5mT2NlBz9G/6YXK8PPfaohCpyLoXu1NNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEkWAJisAwamgGvI9Z9UFLTaiBLpnf4YPaDtfVaeRLLPAiEAwryJu1aefqVrQKclyFQsgq49//7xXlUzpj9J6GG94Q0="}]},"maintainers":[{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0-beta.3_1521633128716_0.5406030353629041"},"_hasShrinkwrap":false},"1.0.0":{"name":"beidou-view-react","version":"1.0.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.0.0","dist":{"shasum":"3ae62340020414e9453023ca6d8e8e37d7420472","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.0.tgz","fileCount":35,"unpackedSize":7465,"integrity":"sha512-bz29RU4ERlot0rgeRpNtkIeBsJ/EHSYEiRASgmija35scIv+xVWans5t60xkNUam7mUSMuPJ4KpVLWi3VXdOjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDW/EJl/mcSLKFTpGbMh/2hmA2vVXJs1xQQ0qHiVhZIMQIhAOLfE64+weHjWS0SnzQTJ1vWnnYb6sFFlRll8rD6LHLi"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"devrsi0n","email":"devrsi0n@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.0_1521787382954_0.32323445875252377"},"_hasShrinkwrap":false},"1.0.3":{"name":"beidou-view-react","version":"1.0.3","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.3"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.0.3","dist":{"shasum":"fe199fbcaad794a8059de152a05d6bb1c9131a7c","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.3.tgz","fileCount":29,"unpackedSize":7481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3rQ6CRA9TVsSAnZWagAAUagP/2A7enf04oj0QQ0fsWL9\nLj+ylOPTLTLZgz9ajmLCksFKt01ts6bLmsKPQWykSp1WAXJ7GWvFRJyFyFdR\nS9mmO/eDeVSlCr+897qbpilfQHSrzHrkk/5of9/OhZ2YrGDXz+tptUxcp7hr\nSUSb0f1O4wz2ur5ON8CernZ1LMnVKKcTMouEYYLJ17uvcnFDyh4sM2Gx8cli\naMdikF8cgB0Bkkw1gX+lW2x2pXw1hY4BGsLRYUNHtDoJi7EddDCqWo2ApPZM\np+VXVLWTmignh0s67+9uWXjwbAfyTlKf/Sb8RDuj+t0G3zXcbiSTlgKP4znI\nzg5Tshhz0IASy7oOluJZPr8ppNJ1JzsuUoxHyXZFx1IWPYCoY4AB1NaMty+V\nvJLwQpoJ52hIa/qZhv88lQFL12MrtiKO+i442iXZ9e6xZfzoj9iJQAzLrUQj\n9p96MzjSzj3lfBv9Ih57aomDsOwKU6/7llBglDspAHJJWxJq0Z6UGr8jjZTw\ntLn2hL96mtFB+aJ8Mw1Gm0p2tmSnaFNP8gDtZzd2v5nEKKPOj/KzW/VlZ2+8\nes5qFEFW1Urcvxzswd/MgmmP/iJBPlgkei/ykGhoyMJNqiaHu798ZLXCWHi/\nugybHA2RX0fp7vuAJOFj8wshDZasERELfWZ8tyVhSlv43e+LcueKM88iyahO\nXXjK\r\n=NmB4\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-nKvAxm85jkUVo9CA4Cg0mPpJlcZmgot9HtcISAjGd1t7BKRd6MgptF7PopOMpuTdwSYgAX7tgCkK+3HpIFquSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiTLpLsw280XRYTMP+JsrJQslSPNGVvvDrcW+cPXvJxAiBV8og8U+pAhtpdh4X8paS25vY+AB9zKij+yQb6eL48ZQ=="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.3_1524544569496_0.06943505250920468"},"_hasShrinkwrap":false},"1.0.8":{"name":"beidou-view-react","version":"1.0.8","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.8"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"files":["app","lib","config","app.js"],"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.0.8","dist":{"shasum":"fd13a08a6c34379aa5222b417476354dc22d405c","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.8.tgz","integrity":"sha512-8M5GqO3zTx2nYtRpID7uB4917B0K5LOGUlUKesdneMyniJX/dU3ezucMY8NWt1UA1yD/chBD2i+RxcyQHp2KBA==","fileCount":29,"unpackedSize":7760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbrIuCRA9TVsSAnZWagAARPEQAIvFp4Li3Zk2XSXYTWHn\nwK0lqTcqFBmMAw0lGdmkZszZZESo6BCx6pmQNqYNOCbUAKCnldmg6GTqJV0L\nx09I0BPun0k+XuLru4QpM94jSofn70qGyW1ovzUM+AUWFh+R8RV4RsKCGPOy\nrDaaWHuF/P+VqwIRUCUw8g9otYbkNbN8QxC7Cya3L2Fc8/KwA9/JrBzJSCdZ\nwsrTmf8wxTovMdigV7J+z52EzFa45hWqgaGWvgBIOYygsxNY+w/8FhyVAZmT\nJJ2BtvEqyPicrzG5Xus8ZGG/s0DlTykdevuaZGmEZCBKjuKZ5WXvl2FwkM/4\nEaAlV5GQvlOTUoLA1s2TTGroSV57cVT84003UAfb3loVtBRfdlKD1zEB1x2n\nciNveqVGwO0TSS0kVqHvGplfaAf4YXuZYfyLllxh32afMMlDWkk9oAOHFnqj\n0OGTzYs2beJlg8lCn5xzvcP6GBLgJw90j9zDNiHsGZ2cEsyEqD7YjTKqZDSY\nEGTdoYynXT07iXNg1+SvJ/PTO8DjRuktlR4Pogst7bVCOYoHT2OBvE0pP87M\nCYAw+4uYYM09ppNTqaJpt+rRyuDhQaFFebEnv8z2QUdQVGqWKlJ5/8dDNHio\nEoOlYZByOjYmSF+jajqkEyiHgGYoVrhwd9y6utr209hCkABCDSN59XA46KGa\n5M5g\r\n=wKMV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqDozLuw0mgRdwtsmBM3snQAQEBJj3mpuZXzx9M55mTQIhAMrUNbv0liOFmBHQbN36mnHvv3VoYFMlh/FBnIMd0Z9E"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.8_1533981229586_0.2539922673113131"},"_hasShrinkwrap":false},"1.0.9":{"name":"beidou-view-react","version":"1.0.9","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.9"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.0.9","dist":{"shasum":"450e5d186b74765e950bf3a9c0bbda3f08949a0f","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.9.tgz","integrity":"sha512-i2jXOAh2eYER9uzsc895MasjFYThtEqu/jVAkimMziJ769EplLtHstsoIf6NFNjesi86BnfmoUP1QGNsWRsETw==","fileCount":35,"unpackedSize":7964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbn0+LCRA9TVsSAnZWagAAuo8QAIlNcxpeUZfrzDxqvN+L\nAxG726aYbAnW66HDiBTdEImOOg4Ta4CySdqEQcM+VCZTDnzGFEX3ZA2uLcjb\n9F+C9cHNjdykW0O3LVsr9s9VwfyrSQgf71X/00+6nKUrl1jFWjCLNJCmvAxt\nQD/vqtSzM0aJu9leJIhgsPSYFEhDMUUZCJrhsJJ7SLJCYdZM0OiJPpPvXTRm\nbyBxuPuzrZlDcv1P65uejxr5G18kqMurOUulaB99N7UigDlD7WlsxmS2ejJQ\n0kwOJ1LLnK4X41TbWORHBKkGMhMDsrYnY54LfmE39pRAzZ3cJ7fb2cxG+7zq\ni4ytAuKCMAEh6hAc0i8Oeu0l9jeWLOtC5tRV4QPPx+s37TqsLfmECL95DmbN\njay4wNarQVLVA2N0SSs3kFAJmHap72+eNVFoLAPr/F0Ue5p+T07yynVEn4b0\n/jILh9wBN6ReHVRvYMH9SJ2zYpeRvbq2SdmHjMK4HEWQHTqTUDLMS8QyRL2n\niVEuYz8Jrh5V2IvckX0vr9i1E19H9tFZPkmexYi0fuLxAYyNSOL48a/JwlXE\nFIXp0jDvVOEptDJz9OVM6yRmjquhjvTZ3suoABNA3cTcA1z07vT49Gy/QlXb\n5D7y75PjBVplTbFr6ftxwPzQBseUhc0ZJG4OrFlTAdRbfQwsDLZN4beOJZNv\njF9V\r\n=UhWq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHJraFkGOGViEQ4F670bBp/UNDbKj7d6qnY/YKaV581AiEAicyVd5Idd8k44iD0d7F74J+fmPKG7tBBcih1vmERrIc="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.9_1537167242997_0.21169918209783378"},"_hasShrinkwrap":false},"1.0.10":{"name":"beidou-view-react","version":"1.0.10","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.0.10"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"95b69959800e13d95e4ef0a3e9849f7b377aab7e","_id":"beidou-view-react@1.0.10","dist":{"shasum":"df68ba16f9d7ae1fc2d55d104f4cc82fa81e9cf8","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.0.10.tgz","integrity":"sha512-d6QMEmgci3XUexWxPIQPQxLTfbhxGr9PmswkClMmlOZ1PeA4mjBfAWrd8KH034Igz3zYoz76yyg2yZXhYC9uRA==","fileCount":10,"unpackedSize":9131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9Mm2CRA9TVsSAnZWagAA2d0P/09ss/0r2xkvK7jrZycG\nYszI8c6xZcA8zliMJhwJ9wHy99JYBEqAf7jFgdwTULjceVtYrUL7fHkEkVvl\nqIY2iglM1M3NjdQqa96QocloHRpLWCtvG/i1WWTedSlBs1R9L2Jxl2q/Z5BM\nSBrkRotV+k3TZH0nYeiZVsEjaiOTf2dA1ViqyKtK4wD4dywJvLsKQ+BWQgFN\nwuShv8XarAA9z8/RBMvTfTncuslFUx97Wg4KJqNbI3GtlYn61CU/IuFkXnIg\nYrR6SZq9ku5YrZlOrN3bAAy+4tEhfdNQSTgB9UUwXELipU+VlMPYEsC+PSmf\nVe96Ms+MtKCdW2hX+NqEc2MU9glXfOOgQGHlbWB6ZNgqQabru645yln1FE0A\n5nlvU+LLNS/zMDxcqgVrFswdWeOJ1n38y24UGwpVuslaMJeKKtSe5efra6aw\nJOFsMWJT1tHisf+fLmoV8SqFeXeeMxmB3uLTdzlgLe60yimof/jzfElM+AyA\nongRu235VeufCB+Z9KJH9+IKbOkdjpdGHCvzcfLRAQBU1M9Jqy0nwor9/poo\nsF8cMy0QXszGF5WIbaK6phitx6NXRI0dtVmUwElGiWXWz1sCsfRK+VGCp5v+\nqXMwzEexIDJj4lcU5aD2PSU2/xeNrH9y7uPHCu+6m8bZSAFpH67E1MtenWcX\nFqjk\r\n=KjJS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7rnpqnULH6Bky8ehV4CvM7Vkz5hFHcQ+NObH27FKENQIhAIm6iD8C0BM1CKOpq1CzfSaOUBC/jwtTVP+zPeq97vFf"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.0.10_1542769077381_0.8832954321056057"},"_hasShrinkwrap":false},"1.1.0":{"name":"beidou-view-react","version":"1.1.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^1.1.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"_id":"beidou-view-react@1.1.0","dist":{"shasum":"3fc03a0454282a8e4d6aef22a549b49413b7691e","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-1.1.0.tgz","integrity":"sha512-KAueWeUldTCiZI9/JKUGKS7lKaRsyZUtfzAFX0aeLLd4rhrP9XnN0WU1GKw8VaaBr3fRafrsars+qIiSwlVEFg==","fileCount":30,"unpackedSize":13293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGH2YCRA9TVsSAnZWagAA3wgP/0LY0915UDp8F0S7nCU4\n5EQqvYtQeKAfAe562YP55nNwrrjvNMLMeRSPE57/Z3nLfZGkbXPCUD+zPxgC\nuvRGHQ79lB0UfASDOPZHucNgogHTqIgWNO1NJmeaijiX9qMJ2y2Ly1J7BWjk\nNg7duXvfzTZ5noM4xgJm/9etn9oS3vSaCuJCJZ6YSSVAr7uxBIFhkjGZzKg2\nVCxDMXjKTvBUnxQ7kAe6WFQGNC/7T95iaFVufIQVNnK7nOZFcW/7YWFzrHKR\njy8fC6Xkm++QXlJmGJj++dAmHg0fURu9Bq59eeZsjdSTdqVfI52ovcXChzzp\nRb6XemBTXOg0WVphu6sBLqhCl3fRt8MSrfb7UqI1PGYS/zpKcFzimvrBb2DJ\ns6tJmWTHyHifGxk4ZtiawchLDUHNOzO9MVgM8q9dWJ1AeZxy3qfwxym70rUE\nlQFkbvi3Ab2kd7jcTrFfoeZ6DSEJohhD4aeWDOIvbfZzXt8XTCdrbY3CEQTA\nkEy5VgIycn1f0S4DFLs0caoo8CRDC5pi5PKEYV51JPfT2gv1nr0WFwIyRYDv\nNklUbyTvtHpdTWshrfUH7rKVh1g2W/o0sbPKmCUa7dsKIQnKeCerOAjFCtbK\ndWJoJ8a3ErEEr+d3vVnS2+Yfiiea9fwJ/fsCHFhXbqwam2wLR6t/4szfaG5g\nPZdU\r\n=G6NY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLvdTFuSacGzzgxtKGgv10E2b5KyyxFD9SXuUhRUh85AIgFtgEwmcm4172we5fiD1zhFh3VH1OKeKpe6kqOfEYWOk="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_1.1.0_1545108888492_0.7199802262986981"},"_hasShrinkwrap":false},"2.0.0-alpha.0":{"name":"beidou-view-react","version":"2.0.0-alpha.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.0.0-alpha.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"d50bc91db479f2a693ef4e34d392d123aaf1738d","readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '/build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Use **internal render component**\n\nUse internal render component `Render` in View.\n\n```jsx\nexport default class View extends React.Component {\n  render() {\n    const { helper, Render } = this.props;\n    return (\n      <html>\n        <head>\n          <title>Script</title>\n          <link rel=\"stylesheet\" href={helper.asset('index.css')} />\n        </head>\n        <body>\n          <Render stream id=\"container\">\n            <App />\n          </Render>\n        </body>\n      </html>\n    );\n  }\n}\n```\n\nThe content inside `<Render />` element would be dynamicly rendered and set back into the view.\n\n**Props**\n\n|  props   |        type         | default |                          usage                          |\n| :------: | :-----------------: | :-----: | :-----------------------------------------------------: |\n| disable  |       Boolean       | `false` |    disable server-side rendering, `true` to disable     |\n| element  | String or Component |  `div`  |          the element type of render container           |\n|  stream  |       Boolean       | `false` |          `true` to use `renderToNodeStream()`           |\n|   app    |      ReactNode      |  null   |            the component should be rendered             |\n| children |      ReactNode      |  null   |                       same as app                       |\n| [others] |         any         |         | any other props will be passed to `element` you defined |\n\n#### The difference between `<Render />` and `getPartial()`\n\n**`getPartial()`**\n\nThe components returnd from `getPartial()` will be rendered into string and put back to props,\nYou can manipulate them in View template. So the _Partial_ rendered first, and then is the template.\n\n**`<Render />`**\n\nBut, for the `<Render />` component, it contains dynamic parts waiting to be rendered. When View template is rendered, each instance of `<Render />` will generate a markup (placeholder) in template result string, View Engine replace regonizes them, gets true parts should be rendered, render and replaces the markups in sequence.\n\nIn this mode, template rendered before the dynamic parts. So we can get the first part of page at very beginning, and send it the browser to reduce TTFB.\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> - ctx.render(name, locals) - render template, and assign to ctx.body\n> - ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@2.0.0-alpha.0","dist":{"shasum":"bc3bab4051405b90d54858a7abcf903851bd559d","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.0.0-alpha.0.tgz","integrity":"sha512-GEwM7oScJhUGPUFudycEhQzXq4JjEuhvOA6eqP8NeDvpTo3uDlHM94R3KWsCq2Nv2Ohm4L/2g/2Dfb725v6UEg==","fileCount":11,"unpackedSize":14530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcI2v4CRA9TVsSAnZWagAAXMIQAIZmzbLmpU/NJC/HKE76\nO3N6JW8gXEDUj32Bp+XR9kfbO3GNjtVXWvqLv4LI725je6oJypFaoQlyNbsV\nwL2hr3aVun33U0QmIxGA4g1XmjNCl5S8YnMSD3eVIiKlTPmZhFHGTlo6Yghq\ngIm0v9Msb5ab/13VLyD3VdXR61ag2cbggqy29aov/LuYpEdXBWLakSZ47HrB\n1Nnp7HnGaoAkk8RhwZMvszQiwqy0+59D8a2j8OhvgcQ0KRrqTgqVrMxhHSig\nil3bxqX2/vRNQ0e92f5VnuRI0wFSOn/0w7yP+F90DfDye1a9IRbVDHgqh6dj\n8lQUO/50FkLZPXIN0OFbZ3X2jSr1TDLfzIIkH5zGe49y/cFoM9u5UW+upv4U\n5wveMFYn1mqRiS6MVB1mAFlnZTbLtd3OvvaiYgqyUKrH+HVOgc+49tj8AOeM\n/hyVWKfTzElRKloQJfoSyfKgSqqizgExLpS5X+YPOD0oY39yzGFM7F6YvdX+\n+DoG7/tCKxD3a6fY09kR92Gi7vTtftpvCOMktUpkRQ/30PzsB2EETnipnruy\nTTp/fKt3He9mMJWxDgA3XJLODgAif0NyJ22++fGWIQGks80ERVPiNxd9K0qU\nBftZ6w5POokGD5IivAL5qlL5uw7XpaJOCgS/uyI8IN6ZsR7f0eKYpWzUBvdO\nISvp\r\n=2I/3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLr086RfVTpsKKUVw66FKm9jN7tJcCiYfU5Q2BRZJgwwIhAOL9snGt1+zb2A4YaDM8jHRxpVYAB1GQ4ArOu5dXC9AT"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.0.0-alpha.0_1545825272187_0.6597551070288115"},"_hasShrinkwrap":false},"2.0.0-alpha.1":{"name":"beidou-view-react","version":"2.0.0-alpha.1","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.0.0-alpha.1"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"0f281a0562e768556e4b68483801c80254ecca8f","readmeFilename":"README.md","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '/build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Use **internal render component**\n\nUse internal render component `Render` in View.\n\n```jsx\nexport default class View extends React.Component {\n  render() {\n    const { helper, Render } = this.props;\n    return (\n      <html>\n        <head>\n          <title>Script</title>\n          <link rel=\"stylesheet\" href={helper.asset('index.css')} />\n        </head>\n        <body>\n          <Render stream id=\"container\">\n            <App />\n          </Render>\n        </body>\n      </html>\n    );\n  }\n}\n```\n\nThe content inside `<Render />` element would be dynamicly rendered and set back into the view.\n\n**Props**\n\n|  props   |        type         | default |                          usage                          |\n| :------: | :-----------------: | :-----: | :-----------------------------------------------------: |\n| disable  |       Boolean       | `false` |    disable server-side rendering, `true` to disable     |\n| element  | String or Component |  `div`  |          the element type of render container           |\n|  stream  |       Boolean       | `false` |          `true` to use `renderToNodeStream()`           |\n|   app    |      ReactNode      |  null   |            the component should be rendered             |\n| children |      ReactNode      |  null   |                       same as app                       |\n| [others] |         any         |         | any other props will be passed to `element` you defined |\n\n#### The difference between `<Render />` and `getPartial()`\n\n**`getPartial()`**\n\nThe components returnd from `getPartial()` will be rendered into string and put back to props,\nYou can manipulate them in View template. So the _Partial_ rendered first, and then is the template.\n\n**`<Render />`**\n\nBut, for the `<Render />` component, it contains dynamic parts waiting to be rendered. When View template is rendered, each instance of `<Render />` will generate a markup (placeholder) in template result string, View Engine replace regonizes them, gets true parts should be rendered, render and replaces the markups in sequence.\n\nIn this mode, template rendered before the dynamic parts. So we can get the first part of page at very beginning, and send it the browser to reduce TTFB.\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> - ctx.render(name, locals) - render template, and assign to ctx.body\n> - ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","_id":"beidou-view-react@2.0.0-alpha.1","dist":{"shasum":"c51e80c5c266c1cf0df9003f76eebb29a69d2bd9","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.0.0-alpha.1.tgz","integrity":"sha512-UbiCOu/vScGwre+f/V4Vs7mynPr4vP+/2If/+aTFGC+afr9rzxKGUjM8j1dNP5q9vdf/3St0u+nSxnOfB2R6sw==","fileCount":11,"unpackedSize":14530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNGYYCRA9TVsSAnZWagAA4PwP/1cF2st0hnRGWB+bzeCK\n4/VqP17fxbKWFwxVt4AgHCZ0S90uKtVC9rTCriFgsY6QemhrLxse/M7fX0mA\n3aYM0gyjYIkHfrubVS3sPs7KDuVOUPZ+Qw+DHftQL+veXSCOaws6BzDOD2yO\nZU9LHPFsYpP3Sa1wyJrvoz2vW7hWSULFz2BwSsGruX+/bQIwhcWE9TCKY6Et\nAdd0n2B5AEOCUP2E2jApn2s0nD1l6qW8tRxQm5ITyuSW3GEH415BcnNGl/qC\nsbezHIyockk3UxLoWUWDF06x8/20rvTi8fSPMHNC8HoFSbDWZ9r9OtuopqB4\nOYrH99FjXkqQ1jGuDuftg1C+LVDW5IsZRnNO/nE8c0odx3MB68uNYhz+nbjh\nu8rIaALVu6BiGR8CYadOTskSql8Xi909GS16Iv14tvZz0stQeZeoBwQp+iva\nY2qXOBmlbUq06lfDHFMHsr37pSSRxO5aOOnP7Goa2uKmwDLZnybO5pGrKOX2\nHbhGf6g2bXkHXBCwyg0IndWASJpLKmPpDAWjvVmXPmdaBAbOv3vd/H/9hkAS\neWoVxawX49KYy/dchZ00cpZdrjZwoOyFtMwSY2EUNp/uzVOwOoui5czOcgVL\nRtdpitJXcw7/hqJUbhOTfn0lYE1FPMnj9aR7mzfWIPPGkc7UePBftf+hAhfO\neA7R\r\n=Otii\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9r+F5ugm9b02Sak9/hIZ+UliFIKrR8f1Qf+QviCqp9wIhAMrTUUp19iVgBU6X8K4OHL35Bcmslexus8Gj1ekoCI+Y"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.0.0-alpha.1_1546937879845_0.5773020466013008"},"_hasShrinkwrap":false},"2.0.0-beta.0":{"name":"beidou-view-react","version":"2.0.0-beta.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.0.0-beta.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"b601b857e2d005cdad7cb7b73462a7e02f23f8e9","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '/build/',\n  },\n  view: {\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Use **internal render component**\n\nUse internal render component `Render` in View.\n\n```jsx\nexport default class View extends React.Component {\n  render() {\n    const { helper, Render } = this.props;\n    return (\n      <html>\n        <head>\n          <title>Script</title>\n          <link rel=\"stylesheet\" href={helper.asset('index.css')} />\n        </head>\n        <body>\n          <Render stream id=\"container\">\n            <App />\n          </Render>\n        </body>\n      </html>\n    );\n  }\n}\n```\n\nThe content inside `<Render />` element would be dynamicly rendered and set back into the view.\n\n**Props**\n\n|  props   |        type         | default |                          usage                          |\n| :------: | :-----------------: | :-----: | :-----------------------------------------------------: |\n| disable  |       Boolean       | `false` |    disable server-side rendering, `true` to disable     |\n| element  | String or Component |  `div`  |          the element type of render container           |\n|  stream  |       Boolean       | `false` |          `true` to use `renderToNodeStream()`           |\n|   app    |      ReactNode      |  null   |            the component should be rendered             |\n| children |      ReactNode      |  null   |                       same as app                       |\n| [others] |         any         |         | any other props will be passed to `element` you defined |\n\n#### The difference between `<Render />` and `getPartial()`\n\n**`getPartial()`**\n\nThe components returnd from `getPartial()` will be rendered into string and put back to props,\nYou can manipulate them in View template. So the _Partial_ rendered first, and then is the template.\n\n**`<Render />`**\n\nBut, for the `<Render />` component, it contains dynamic parts waiting to be rendered. When View template is rendered, each instance of `<Render />` will generate a markup (placeholder) in template result string, View Engine replace regonizes them, gets true parts should be rendered, render and replaces the markups in sequence.\n\nIn this mode, template rendered before the dynamic parts. So we can get the first part of page at very beginning, and send it the browser to reduce TTFB.\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> - ctx.render(name, locals) - render template, and assign to ctx.body\n> - ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_id":"beidou-view-react@2.0.0-beta.0","_nodeVersion":"10.14.2","_npmVersion":"lerna/3.10.5/node@v10.14.2+x64 (darwin)","dist":{"integrity":"sha512-0rP7W8havwPUroDfhAspYblUpPibfYfvD6pDulnlWUdIPHZUozzYc5bMGcXFeqS7WM5+skM54FHoxt01qalr9A==","shasum":"2518d3433abd95ad419ddd467658ee9306747bd0","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.0.0-beta.0.tgz","fileCount":11,"unpackedSize":14679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOFQTCRA9TVsSAnZWagAATU8P/ibbRWelbUJJH9b28Bx0\nPrsbCJdsl7OE0ECYzUNmKC0FQ6gT1Yvd7tyhTnM8fHNB7fhoIRe5BafZoYrY\nCW6FiAFzwtlWrYiC1D5MX8ZAgZsDe2ZB4aoivsNB0fBpM+8WWZDxZH3tcFma\n1e7m9qW2hTJ9SR5qtxySA404uWc5YATH11X5DauHuXYjWrsBqr4EGxYcThDn\nkdUT3Lv7zz9KYLZi/vs0AYVzI4ezEN+tzDFSlOH5eNdoTFhaFWW1S3XMscs3\niG7wxwL2XODJapfqm7nqfMlUfUDWOZTbmgLlwbP+vgwJcucPTdtVzMmeWPLG\nAWl2mpBTwXb1OnpMIKj8ZdQ3CL6T2hSlhpxy3ouj+uPQtPY9i+DHF/gikmI1\nb4hQeeo2Z8W/BqlWpqinX+YlwZBs/JdQvm02S9w1XrROzmypWLTDgVVGLM26\nwsGbfkkBiHHhoxAmjsXphrbCBG0sMaw1t6IkZv3RycDtqOg81DdNORjyzXV4\n///61T2gIODrQ1O84TTKta9cZV6MpuPKrcebRXcUWh3P8+kAztnIv7E4VCPg\naf3dCYgQQu8LzaciCBQhEU7yWhmQ4uEaTuyCSZO7qsGSt4RL+A90DbHvm7LL\nyAjPEvXsUB6ADVa0YzM0uNm0tC9h3NHGsB41q16yqYHehKW/lZnOT+C1zC4E\nU/6P\r\n=t73P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqVg33dEbU3QSRrjrx06iA1UzWbuXNo2O4kQ2JE3f/pgIgaWgquTM7CDABImd6uCx6dZnwVEVViwYN0Ccrzcd9pbg="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.0.0-beta.0_1547195411020_0.452582099022665"},"_hasShrinkwrap":false},"2.0.0":{"name":"beidou-view-react","version":"2.0.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.0.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"9dff20044847ec621877f1105de0f61368f4284b","_id":"beidou-view-react@2.0.0","_nodeVersion":"10.14.2","_npmVersion":"lerna/3.10.5/node@v10.14.2+x64 (darwin)","dist":{"integrity":"sha512-XyGI6mkG/Uc1JFY01D9mmlH9sJQdm3LW5NTotU/IuME9VAorSXMa5geGmRfuLptqOldblYivaVTeFLsP+BHkNQ==","shasum":"9143209fe1ad2d8148ec25d578fd7d231962bfde","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.0.0.tgz","fileCount":11,"unpackedSize":14846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPx+aCRA9TVsSAnZWagAAGq0QAJCpCpXymI2l8ybyI2jI\nl8FNBVPXZsdrONqZpUF1rnJY9WSJUYEQzS7nWHv9/DlipLRi5FQRfmVyLg3x\nqVhxTQZilrfu94X3L+tMsiA4aarhqlGyzfG7H8MZLVq66cLI7oS7f7zYzokH\nM0nR0mbcCDZJW2QgEr3EQCHgifai8bteS9/YXTEjrChRUBNL2K8y5lyopw2k\nHxs24vPS3uaNMjaHAsZA6JWYHlfAvPO+HiCHRhqLvWBy2fAhmoQLi+lTVm4H\nouzmjo2Nvu4rBrvKYuqRuLUO8Y7ZZdDEjshnkrawHrIKkEXpOZxk1c9nI1u0\n1iqHygjFoJs2edbGe3edy/zCafJIQ3RQWGH823GsK3lIiqpe3fKRmJwKNYff\nINr5AXuXu41u+2qV4m7CdWnRFJtWLLESKIysAmWLkY6yF2UIukGi+5t8LumD\noZIAP/Y5WHKz1XaVhDJtWH8q/W47iE5Q5Y7IFg4E0n8SgPujqsxTdmxG0tjw\naBfR9oaJeHLHBRIGwtdV1nUjL0BeNrO53BR/SNal7w/N64t0eapRXg2cwFLp\n8eIpNmqPw0/uHoBn8aYCpSHB35ZGnus5+CExJZ+pONlLEH6jE5eEgoJ+Auao\nw2hML4kOtqbJGbwCMlrjH8mXoFUyxN5l8RW/RZtpfv9eBL19H2r2Vf1JhXUE\n/ptE\r\n=izc+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDef0S21oykl6dM3kwk7MPZK2LsYCY1uiOdSy91+viVnQIhAPHscu9uJbhJ2N4TsfvslLxQoTyRLtS79eJqYYhl8Ouz"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.0.0_1547640729859_0.5236811947880089"},"_hasShrinkwrap":false},"2.0.1":{"name":"beidou-view-react","version":"2.0.1","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.0.1"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"c5704dce53d214be324134454773ad2d7ba7e191","_id":"beidou-view-react@2.0.1","_nodeVersion":"10.15.0","_npmVersion":"lerna/3.10.7/node@v10.15.0+x64 (darwin)","dist":{"integrity":"sha512-N0H8k/cZ06xvQy2TB5emmcaHRdzpsh2KbVu1jwErJVhDxoxsvSLt2EZM7rlngSwEpeVb3cfMNdi8+M3mky+0bQ==","shasum":"90cf188df8136978105858d42d08804cde181fc9","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.0.1.tgz","fileCount":11,"unpackedSize":14846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUFL5CRA9TVsSAnZWagAA7g4P/iZkYAkDk9dJNOTHD5ot\ns4vgKVnMWQOO41zMehBxyR14tbJ/rwuU5VY1MYHZM7pa81luzW9/sNQKdNq3\nD263n2334rDt9fovawOkgJTQHlaEGi2x2Bplkn6JNgHKDvl3rFA9NERQuYL2\ntWWGTFkQTz6wmSJqJj3aYOwMxQwU4o6IPb1TH5PbEY7SICCjPMYd4AFQd5AI\nANyGa+FAOC8WfxMIGY16JCbbEsBpO3LcWFatXZ9kYGqM6w/8rh9qnXNejTQE\nBjUfGVO7VC5j2RpyVwfqg0l3vQNxHjx7vyf41HoyNjM7toKnvcGcQolWGI0/\nj546n5UcbVINMjglnFpDVP9l/Kme948/KUWEPD+Xgqz4qTXVHP4o5kQ9llqM\n0aua3Ft2cqpN6NPJWabUbUez9HoqC86PFiPCu8GIyI5BhjV3+/6sCWkgawxM\ngcDo4KSCt9t9md1G8DE21C0telMMTbI7qDK+eu29ypwwBx5X9aX4DfvhC1Ot\nzjBk6VTSKgjCsMy5JZwhsIzHJi1Ww1HRDqSChNA+YvZ5xKTFvaJBmf29OYUL\nrGSPX+KrMhPEddkRJ9kivhsAwS7GR1+HY8XH/nK5pjMHkNSemYHf0+cL/OlN\n+XCdf0WB1Eh0w3Is50vPQ/DXR7OVINqvnkst2uIj0Ir5IgPMzfFrYwqevyDz\nddUi\r\n=zLud\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb03L0IQm7bZiWoMHUyMax6MTfrUjj8OxB2RxImNFalQIhAMCLZDq1fF5bdGmJLwNygYGmYrtmSXRc2rioDO64eKhN"}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.0.1_1548767992464_0.5954854811507755"},"_hasShrinkwrap":false},"2.1.0":{"name":"beidou-view-react","version":"2.1.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.1.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"283fef24abb0ffb63d2bfbede20e379e3458fa7f","_id":"beidou-view-react@2.1.0","_nodeVersion":"10.15.0","_npmVersion":"lerna/3.10.7/node@v10.15.0+x64 (darwin)","dist":{"integrity":"sha512-xTiq2sbMr0p7lN8eppzcQfivBqDV/l5oDvGqcU+Om8dWrciHj0KfzrhpIbupfo4yjNg5+DcCj3hp9QTe6bgL7Q==","shasum":"7694250493b0ac83e295f09519f59a054e65f83e","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.1.0.tgz","fileCount":11,"unpackedSize":15239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwuAJCRA9TVsSAnZWagAANW0P/Rd6LcESOXHbjVbteEZa\nUjyz/pJe5cyBEN9M4dA9kgA3RgiAjLcj/WaD0FYXtbO3VdyUAeIM6igmiLQc\nJLBmOSjRll2YV1PFwNk6Z0PQAxf8sxqZqm5tMz/Ausg21rW6qT9DBOT62ld+\nRWQlcDRu55T8ubT/UHRx48zUJ3CaOvvcNVtj6QLIJdXpBgzrm9CevKQZcdg9\nqD2XE9XpolKb21R3064S5tRgzjSJMiEiHteimg0knFHMpAfAoppxAEmSJG9j\n1Y1o2Y95ki/bdryG1BgfuODZ+oLS2jZ38Ln5ojlg+t5bS2MjTyzjNqws4ULr\nG5PPAVruoxdGsxyimKPqa9lojBEg6Zvd80gahSXG3IT6dUXsNePVDyUlirjD\nLYnWoT7FsAZ71NItKJ9ahCQglrnxrAnlvWMtwCRXqZVeq51H/jfwNVd4WGsS\ncZr36NFNtTW/p0KitryuJ2IIpAx289M6dnKldot7GkZNFuUiHmkzp/mJ/d5o\nsSdfekA0F8IWnVfznPEP6zfHt7kNF7aCLZG6ZEXnLXaKnaWYzDNJtsv9yyey\nQJRXk15Vs4LRvPxiouwXzzQzZMjWoH1xDZIYlmwVwEjg7duRXtQ2wGkZI12g\n66DyIYo6JFTHyNCGSXIXiWREy8hTJNsCB+f3uN/qQKZselENuXvi3fzrmoDC\neOCX\r\n=7fGn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+JW8RHqBRlKJ3R4kD8rjydU+cmdyu1uZ9kUzoaptJEAiEAgADRI7AQaqy46hOKRrpW8AsLuHf/fQzKvbtSEmloD7Q="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.1.0_1556275209124_0.8457859137479196"},"_hasShrinkwrap":false},"2.1.1":{"name":"beidou-view-react","version":"2.1.1","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.1.1"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"8068627513a7b82197de93d86daf98def6594dab","_id":"beidou-view-react@2.1.1","_nodeVersion":"10.15.0","_npmVersion":"lerna/3.10.7/node@v10.15.0+x64 (darwin)","dist":{"integrity":"sha512-js03bAbbz685XDbIosy9DQ7qRb3T6q5ZxhoD6Mga2+SyvMg8+iFvEjEU2DbelXeTXRQRswzz6+odASsk7qRmbg==","shasum":"33aaee70d1a91001d19ec2ae9cad2526d36fcbcd","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.1.1.tgz","fileCount":11,"unpackedSize":15239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcz9BxCRA9TVsSAnZWagAAQ0sP/1Iwd6oluPMcX5RjyIlD\nrdSKKqoxwYjQRkMGKPIVip5AuLXJiyewE82o/fHnv5KrCDQI2Q/XmucQ2V7x\n6vzG3QEoqX/EZLkbNLNPu1CuPGyd/41ZnHZqAbSJPRWcH2NyI07cuyXsKMqx\nhsGLDBHSjYRbfXicNQ7mUuj+sFsYQFQTa2KJBsKVJ6tlTmv1hdeK71NAwTWf\n/xeJCCTkKHIkMDxH+jVzJ3PT6itVsNodMCJy8+VJvNHs6ayIzlhNU+PB7OeN\nh0p7uB99xa2l/ZSuek1WcGHSwrUhIobSk9CW/c3b6b4gn9LhnEIjPhiYEVBc\nrY5/6HoACdY3G3lIhflnEuVmlC1K7mcX+wx2MgxTHmLSQtDyl51usDYRMc6U\nTIbYXwH2AdJcV5jOxLgcoYyeY8nTuLwaVnT/F0KRmkVow1N4eMPNf7myPmrX\nSX4g+bSUKnN3fv4nmbakAxMqyvaN44/IpNgbXuyn7JnWuDTi2hN4m9Loofb4\nzwZ2guUMw/ipY/wfkAvDk6djIhbhR9QonNOJYl/EknmvZHyNS5Mo4zhwiJvz\nwKX7P0KOqnd+tABLXsdfPpuwtkeVahTkRmhfcpSFUEkgblYKOcDgmZwmXWEk\ndBxHhw7rVcl1K3XgU2HmOry9FEn48UXXWJP2xjgHDWdpa4QlwVpHeIX2kgZj\nXTBe\r\n=K+zq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJVTyH4zs36xkH6W0f9uFcaZtF0fTMIO6+JcnwH40CrAiEAjyQkKy6Zr0og/DHkhPVxtOuE95Pcxa8qMhKFuSn9B9Y="}]},"maintainers":[{"email":"devrsi0n@gmail.com","name":"devrsi0n"},{"email":"njugray@gmail.com","name":"njugray"}],"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.1.1_1557123184662_0.47655741028233667"},"_hasShrinkwrap":false},"2.3.0":{"name":"beidou-view-react","version":"2.3.0","description":"beidou view react","eggPlugin":{"name":"react","dependencies":["beidouView"]},"main":"index.js","scripts":{"test":"TEST_REPORTER=spec egg-bin test","cov":"TEST_REPORTER=spec egg-bin cov","history":"egg-bin history CHANGELOG.md"},"license":"MIT","dependencies":{"beidou-view":"^2.3.0"},"peerDependencies":{"react":"^16.2.0","react-dom":"^16.2.0"},"devDependencies":{"egg-bin":"^4.0.0","egg-core":"^4.9.1","egg-mock":"^3.7.1","react":"^16.2.0","react-dom":"^16.2.0","react-redux":"^5.0.6","redux":"^3.7.2","should":"8","supertest":"1"},"engines":{"node":">= 8.0.0"},"repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"gitHead":"218112eb300d7b82add9bc03b637e0fc5b482c1b","_id":"beidou-view-react@2.3.0","_nodeVersion":"14.7.0","_npmVersion":"lerna/3.22.0/node@v14.7.0+x64 (darwin)","dist":{"integrity":"sha512-rJdZa3mMhf4RHcs99HP2/MSz7eywPqc/sKUmSMOVuQl055NusCtzav0sDuPI9nNbedoSgL6D7mA5AB3ely9t1g==","shasum":"5b260d37203e4c6a0b54432d7849f59ac0a67ac6","tarball":"https://registry.npmjs.org/beidou-view-react/-/beidou-view-react-2.3.0.tgz","fileCount":11,"unpackedSize":15239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHhiuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBaxAAjPjxvljgpDNyhh9wurrB/0haLVZpbgkyuAn30yKvlWyImEJM\r\n5ZtzH0HMxj5+/1B4S1APOn7pUjDqyrzulgJm5DKOedCTwcxdy7tb8BnWMGX1\r\nLWDWCVEpYz5mFxmAYYIjWIwPiC4ZT0+h3ju/KSHtt0Vywe4TW3GxZPH9amT6\r\nhkqRCt33lSeoJeEOt+TWNIdwb7D/sVGrOr8HCu4Wu1JPixu01ZGzu/gm7+17\r\n5sDkp+8janV1/84EuB2e9VPfBnvU4FQe/hp4N7ZPrqQ3buwo9nCsTwBLK63d\r\nr6CdLNFmc/IJqKJc2yVVZC5y+uJUbpQfj+LckwZ0FOHXO+MKcmwOhHTAZVyD\r\nS/F23HERuDfZ87Sh1XCHsL25rFFmdsLhUU6/v44bHrVYrHL+WBvNeqS5kRm6\r\nQHbfurUgXVIEelRe2F785Wu+L+rbBG152ofJHLjRUe2kLsjt+mIPQdpr3/2o\r\ncyA08GG74ttV/5T3JRr6yFyfWT7Q/YkRsyoQTyqOgNMQm+wnUZAeXWYMVGJC\r\nIARPdehlltZ3epdgBC5K1v9FtqTulxrCPSYqTOVXtsPplpE680pTSBdgTbGg\r\nAZiGNv+v//veUafVRedx06DoO8br2dDokMAkzSEqZ3qKcCIR0MQPiRwBqyJd\r\nSWJnRieTdSId5FnE2A4hc6KCYcvh+qDWSFg=\r\n=ZzBv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHygIQrIDw5s6gqS18sesrSIAsb0bVxfIjKeqcljN5nrAiEAseZ4EvfRhEpvGYY88+BOGxP9cMZYnnT7K0GyNctmE84="}]},"_npmUser":{"name":"njugray","email":"njugray@gmail.com"},"directories":{},"maintainers":[{"name":"njugray","email":"njugray@gmail.com"},{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beidou-view-react_2.3.0_1646139565899_0.5494211160676241"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-09T01:57:44.265Z","0.3.5":"2018-02-09T01:57:44.348Z","modified":"2022-06-13T04:30:18.510Z","1.0.0-alpha.1":"2018-02-09T02:09:05.439Z","1.0.0-alpha.2":"2018-02-09T03:03:53.296Z","1.0.0-alpha.3":"2018-02-12T10:52:03.056Z","1.0.0-alpha.4":"2018-02-24T11:24:57.030Z","1.0.0-alpha.5":"2018-03-01T09:29:32.998Z","1.0.0-beta.0":"2018-03-09T11:36:01.361Z","1.0.0-beta.1":"2018-03-09T12:12:08.476Z","1.0.0-beta.2":"2018-03-15T02:35:01.733Z","1.0.0-beta.3":"2018-03-21T11:52:08.780Z","1.0.0":"2018-03-23T06:43:03.008Z","1.0.3":"2018-04-24T04:36:09.553Z","1.0.8":"2018-08-11T09:53:49.688Z","1.0.9":"2018-09-17T06:54:03.150Z","1.0.10":"2018-11-21T02:57:57.506Z","1.1.0":"2018-12-18T04:54:48.585Z","2.0.0-alpha.0":"2018-12-26T11:54:32.312Z","2.0.0-alpha.1":"2019-01-08T08:58:00.082Z","2.0.0-beta.0":"2019-01-11T08:30:11.180Z","2.0.0":"2019-01-16T12:12:09.950Z","2.0.1":"2019-01-29T13:19:52.554Z","2.1.0":"2019-04-26T10:40:09.282Z","2.1.1":"2019-05-06T06:13:04.785Z","2.3.0":"2022-03-01T12:59:26.054Z"},"maintainers":[{"name":"njugray","email":"njugray@gmail.com"},{"name":"devrsi0n","email":"devrsi0n@gmail.com"}],"description":"beidou view react","repository":{"type":"git","url":"https://github.com/alibaba/beidou/tree/master/packages/beidou-view-react"},"license":"MIT","readme":"# Beidou view react\n\nBeidou react view plugin, used by `beidou-core`\n\n## Install\n\n```bash\n$ npm install beidou-view-react --save\n```\n\n## Configuration\n\nDefault configs\n\n```js\nconst path = require('path');\n\nmodule.exports = appInfo => ({\n  /**\n   * React view options\n   * @member Config#react\n   */\n  react: {\n    // React view rendering middlewares\n    middlewares: ['cache', 'redux', 'partial', 'render', 'beautify', 'doctype'],\n    // optional, beautify HTML snippet\n    beautify: false,\n    //optional, if false, clean require cache for development usage\n    cache: true,\n    //optional, true: renderToString or false: renderToStaticMarkup\n    internals: true,\n    //optional, HTML doctype\n    doctype: '<!DOCTYPE html>',\n    assetHost: '',\n    assetPath: '/build/',\n  },\n  view: {\n    useHashAsset:false,\n    defaultViewEngine: 'react',\n    defaultExtension: '.jsx',\n    // Isomorphic directories\n    root: `${path.join(appInfo.baseDir, 'app/views')},${path.join(\n      appInfo.baseDir,\n      'client'\n    )}`,\n  },\n});\n```\n\n### Use **internal render component**\n\nUse internal render component `Render` in View.\n\n```jsx\nexport default class View extends React.Component {\n  render() {\n    const { helper, Render } = this.props;\n    return (\n      <html>\n        <head>\n          <title>Script</title>\n          <link rel=\"stylesheet\" href={helper.asset('index.css')} />\n        </head>\n        <body>\n          <Render stream id=\"container\">\n            <App />\n          </Render>\n        </body>\n      </html>\n    );\n  }\n}\n```\n\nThe content inside `<Render />` element would be dynamicly rendered and set back into the view.\n\n**Props**\n\n|  props   |        type         | default |                          usage                          |\n| :------: | :-----------------: | :-----: | :-----------------------------------------------------: |\n| disable  |       Boolean       | `false` |    disable server-side rendering, `true` to disable     |\n| element  | String or Component |  `div`  |          the element type of render container           |\n|  stream  |       Boolean       | `false` |          `true` to use `renderToNodeStream()`           |\n|   app    |      ReactNode      |  null   |            the component should be rendered             |\n| children |      ReactNode      |  null   |                       same as app                       |\n| [others] |         any         |         | any other props will be passed to `element` you defined |\n\n#### The difference between `<Render />` and `getPartial()`\n\n**`getPartial()`**\n\nThe components returnd from `getPartial()` will be rendered into string and put back to props,\nYou can manipulate them in View template. So the _Partial_ rendered first, and then is the template.\n\n**`<Render />`**\n\nBut, for the `<Render />` component, it contains dynamic parts waiting to be rendered. When View template is rendered, each instance of `<Render />` will generate a markup (placeholder) in template result string, View Engine replace regonizes them, gets true parts should be rendered, render and replaces the markups in sequence.\n\nIn this mode, template rendered before the dynamic parts. So we can get the first part of page at very beginning, and send it the browser to reduce TTFB.\n\n### Custom view middlewares\n\nYou can access view rendering process to meet your needs. For example, if you want to record rendering time, you need to write a `time.js` to your `app/view-middlewares/` directory. If you don't understand middleware please read [middlewares](https://eggjs.org/en/intro/egg-and-koa.html) before you digging into code.\n\n```js\n// app/view-middlewares/time.js\n\n/**\n * @param {Object} viewCtx - view context\n * @param {String} viewCtx.filepath - rendering file path\n * @param {Class} viewCtx.Component - sub class of React.Component\n * @param {Object} viewCtx.props - rendering props\n * @param {String} viewCtx.html - rendering html string\n * @param {Object} viewCtx.config - app.config, access to all config\n * @param {Object} viewCtx.options - app.config.react\n * @param {Function} next - middleware next function\n */\nmodule.exports = async function(viewCtx, next) {\n  const startTime = Date.now();\n  await next(); // Execute other middlewares\n  console.log(`Rendering time: ${Date.now() - startTime}`);\n};\n```\n\nSet \bappropriate middlewares order\n\n```js\n// config/config.default.js\n\nmodule.exports = () => ({\n  react: {\n    middlewares: [\n      // Recording time at begining\n      'time',\n      'cache',\n      'redux',\n      'partial',\n      'render',\n      'doctype',\n      'beautify',\n    ],\n  },\n});\n```\n\nStart the [view-middleware demo project](../../examples/view-middleware/README.md) local server, you will get something like below:\n\n![Rendering time](./screenshot.png)\n\n### Using CDN\n\nYou may use CDN resources when your project online. First you need build your project to assets and upload to your CDN server, then custom your asset config in `config.prod.js`.\n\n```js\n// config/config.prod.js\n\nmodule.exports = {\n  react: {\n    assetHost: '//your-cdn.com',\n    assetPath: '/project/1.0.0',\n  },\n};\n```\n\nIn your project entry `render` method, using `this.props.helper.asset('main.js')` you will get `//your-cdn.com/project/1.0.0/main.js`\n\n## Usage\n\nUsing render method in your controllers\n\n```js\n// app/controller/index.js\nexprots.index = async function() {\n  await this.ctx.render('path/to/index.jsx', {\n    user: 'beidou view',\n  });\n};\n```\n\n## API\n\nReact view exports `render` and `renderString` 2 APIs, return Promise.\n\n> - ctx.render(name, locals) - render template, and assign to ctx.body\n> - ctx.renderString(tpl, locals) - only render template to string, will **not** assign to ctx.body\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}