{"_id":"vue-client-only","_rev":"2-f6983dc99093360d76c66639bd72f08e","name":"vue-client-only","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"vue-client-only","version":"2.0.0","description":"Vue component to wrap non SSR friendly components","repository":{"url":"git+https://github.com/egoist/vue-client-only.git","type":"git"},"main":"dist/vue-client-only.common.js","unpkg":"dist/vue-client-only.min.js","scripts":{"test":"echo 'no tests!' && npm run lint","lint":"xo","build":"npm run build:cjs && npm run build:umd","build:cjs":"FORMAT=cjs bili","build:umd":"FORMAT=umd bili","prepublish":"npm run build","example":"poi"},"poi":{"entry":"example/index.js","dist":"example/dist"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{"bili":"^0.16.0-rc.1","eslint-config-rem":"^3.0.0","poi":"^9.3.1","xo":"^0.18.0"},"xo":{"extends":"rem/prettier","ignores":["example/**"]},"gitHead":"15128f5f902a1a94316e5c55f722233dbcdd5f1f","bugs":{"url":"https://github.com/egoist/vue-client-only/issues"},"homepage":"https://github.com/egoist/vue-client-only#readme","_id":"vue-client-only@2.0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA==","shasum":"ddad8d675ee02c761a14229f0e440e219de1da1c","tarball":"https://registry.npmjs.org/vue-client-only/-/vue-client-only-2.0.0.tgz","fileCount":7,"unpackedSize":8550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEcbdCRA9TVsSAnZWagAAl6gP/3+nIea7+omNuOwX9H0Z\nz2yBD147DKAOcmPVwfwA4ks4x8zMDMRnuHbzN9/jgO8E1+PqhOcY/RMQcOwd\nO/2L0e11M6pk10AR8j3jBeWyU5P7fScudNxcQ3Pwkg08G7K099LOUQqv3tvv\nCpKZ1tXTD5KMGS3I34LfGOqjEYdsmqhgFCioAjtkk+q9zeJu2AW+Y293Jjmt\nhRFb5D4KnS0vTB3LC7Hb94VI6O55Toge8XrUjYRa4UEqtuhShe36XAz5nFbv\nSnrd8NYz5e8hivCWUbJiRNS1lDcudxq1tQNq79eh2qP59f826vCIb4JQULMB\nvq09UIr5lAY4NZfISsTQTgE7v1GmTSIhjM91lMbJCD/Q5k+hVdNq5h59W+43\nVgKkBgH0gbdkcGfY5BOLQf4LEbPQFH+XdiUNK85V07PWaU4tcgcd9Ey/yvxz\nRonESBNTkX3G+ynPeeXUkrLTcRY8WEaGetPbzPKke198x7A2pupMDazM5Tn7\nghEq6vS2p9EUL5SwlYZGuvRdfl1oJuSXPq3TqWpI2cvoeCZjuXb5A2+r9BVw\nTC1WspJMAdHIWgbqeUxYtCfm26nVK+f6HFqNjBZUECbPvmIlZE//9GCUobUG\nRXOIlICHS/hKeV5a8g3KBCoKLGWuAdmxNpL1UuK36EvNE2Y03A0yUol9xBvT\n8cPN\r\n=uXo0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCssMHlC54iEySs8dOxwN7rOCU5Atc5/9mv7salEEOvpwIhAOIUXdxsKwvUlwd+DQ6RB4lYdH1v+OI6Q7/vcZTn1RQg"}]},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-client-only_2.0.0_1561446108761_0.40884311322078504"},"_hasShrinkwrap":false},"2.1.0":{"name":"vue-client-only","version":"2.1.0","description":"Vue component to wrap non SSR friendly components","repository":{"url":"git+https://github.com/egoist/vue-client-only.git","type":"git"},"main":"dist/vue-client-only.common.js","unpkg":"dist/vue-client-only.min.js","types":"types/index.d.ts","scripts":{"types":"dtslint --localTs node_modules/typescript/lib types","test":"echo 'no tests!' && npm run lint","lint":"xo","build":"npm run build:cjs && npm run build:umd","build:cjs":"FORMAT=cjs bili","build:umd":"FORMAT=umd bili","prepublish":"npm run build","example":"poi"},"poi":{"entry":"example/index.js","dist":"example/dist"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{"bili":"^0.16.0-rc.1","dtslint":"^4.1.0","eslint-config-rem":"^3.0.0","poi":"^9.3.1","tsd":"^0.16.0","typescript":"^4.3.2","vue":"^2.6.13","xo":"^0.18.0"},"xo":{"extends":"rem/prettier","ignores":["example/**"]},"gitHead":"9b9da32082bc4bc60294e3db026a39622060c1cd","bugs":{"url":"https://github.com/egoist/vue-client-only/issues"},"homepage":"https://github.com/egoist/vue-client-only#readme","_id":"vue-client-only@2.1.0","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-vKl1skEKn8EK9f8P2ZzhRnuaRHLHrlt1sbRmazlvsx6EiC3A8oWF8YCBrMJzoN+W3OnElwIGbVjsx6/xelY1AA==","shasum":"1a67a47b8ecacfa86d75830173fffee3bf8a4ee3","tarball":"https://registry.npmjs.org/vue-client-only/-/vue-client-only-2.1.0.tgz","fileCount":8,"unpackedSize":9066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguKULCRA9TVsSAnZWagAA+b8P/RciqMA7iBr6wu/XaBSU\n+KHjdvdaYs25EUxJIphHCqwqFGDDohMnJcAKX2M+FxQkeo9vATqFSHLsky41\nuWD0N19BvQTAUMcrd83j4nIMyEnI2moarncaJ3yC7Hm34V4oTk5svuPRbRKa\nmVHMICo+Q+etUUNtZjPyqTvxezvzc2HG6DkMJyqWZVe9LTD8eO5D0G4I8ZKa\nP+mDO1jekuTy2TZWP3Tb0lja3GN2AxESJ4A48ruqAB7OU5CPRFJXkKKUUdZW\nSK6QGHVIKhRQ/pc4rTkMvin9c1Q3H3KlGTaYwE8vmB/vFuyPz1WOrF34++00\nYdzj9z6LRDo+mZGyObqZu9APGALtWcM0Txw+WAYHG0/L+7uwvmfQ4TW4xEz7\nJJnz+5buWHcrPZjsKaIEVx0rz8seSIVcEbciGya7MByYwtrEeb6kR7uRGnIA\nYqpyiaXPqb4PwyPnSwpHN6btPzpC5icfuOa5vmA3m/v231M1W5f5j+auK2N0\nEawGE/xqwnOG4zrJlR3u/w8Ryd6IgvikTvXIShgfMdzjDwtT8f/kC/WgJDIy\nYeJpKWWvGI2OUe/Cwb6lxCp59aDgZg+RhfvRcOwbzFyxDh8KKoohMvPn45SP\nPlvE/+ZP10u3+PC73LMrz65xHddYodMvCfjP7E1BVtmoxiZ/4ZZo9UEHQtKo\nxl6I\r\n=pnVj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEEeHKLHWSHvuhq7h4CQwbwgJpex5kUYlaeud4FQr80AAiBbeHQ0Tos0KAPmpjDuD0EumeJf8NCw5e1dDmw3pOOk/A=="}]},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-client-only_2.1.0_1622713610901_0.14619260191125028"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-25T07:01:48.761Z","2.0.0":"2019-06-25T07:01:48.879Z","modified":"2022-05-23T13:20:10.238Z","2.1.0":"2021-06-03T09:46:51.056Z"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"description":"Vue component to wrap non SSR friendly components","homepage":"https://github.com/egoist/vue-client-only#readme","repository":{"url":"git+https://github.com/egoist/vue-client-only.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"bugs":{"url":"https://github.com/egoist/vue-client-only/issues"},"license":"MIT","readme":"# vue-client-only\n\n[![NPM version](https://img.shields.io/npm/v/vue-client-only.svg?style=flat)](https://npmjs.com/package/vue-client-only) [![NPM downloads](https://img.shields.io/npm/dm/vue-client-only.svg?style=flat)](https://npmjs.com/package/vue-client-only) [![CircleCI](https://circleci.com/gh/egoist/vue-client-only/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/vue-client-only/tree/master)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)\n\n## Install\n\n```bash\nyarn add vue-client-only\n```\n\n> __This project is previously known as *vue-no-ssr*, switch to [1.x](https://github.com/egoist/vue-client-only/tree/1.x) branch for the old docs.__\n\n## Usage\n\n```vue\n<template>\n  <div id=\"app\">\n    <h1>My Website</h1>\n    <client-only>\n      <!-- this component will only be rendered on client-side -->\n      <comments />\n    </client-only>\n  </div>\n</template>\n\n<script>\n  import ClientOnly from 'vue-client-only'\n\n  export default {\n    components: {\n      ClientOnly\n    }\n  }\n</script>\n```\n\n### Placeholder\n\nUse a slot or text as placeholder until `<client-only />` is mounted on client-side.\n\neg, show a loading indicator.\n\n```vue\n<template>\n  <div id=\"app\">\n    <h1>My Website</h1>\n    <!-- use slot -->\n    <client-only>\n      <comments />\n      <comments-placeholder slot=\"placeholder\" />\n    </client-only>\n    <!-- or use text -->\n    <client-only placeholder=\"Loading...\">\n      <comments />\n    </client-only>\n  </div>\n</template>\n\n<script>\n  import ClientOnly from 'vue-client-only'\n\n  export default {\n    components: {\n      ClientOnly\n    }\n  }\n</script>\n```\n\nBy default the placeholder will be wrapped in a `div` tag, however you can use `placeholderTag` prop to customize it:\n\n```vue\n<client-only placeholder=\"loading\" placeholder-tag=\"span\">\n  <comments />\n</client-only>\n```\n\nAnd you get:\n\n```html\n<span class=\"client-only-placeholder\">\n  loading\n</span>\n```\n\nIf prop `placeholder` is an empty string (or `null`) and no `placeholder`\nslot is found, then `<client-only>` will render the Vue placeholder element `<!---->`\ninstead of rendering the `placholder-tag` during SSR render.\n\n## Development\n\n```bash\nyarn install\n\n# Run example\nyarn example\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Author\n\n**vue-client-only** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/vue-client-only/contributors)).\n\n> [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","readmeFilename":"README.md"}