{"versions":{"1.0.0":{"name":"@vuepress-reco/vuepress-plugin-extract-code","version":"1.0.0","description":"Features and code presentation plugin for vuepress-theme-reco or other vuepress theme","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","eslint-ext":"eslint --ext .js,.vue ./","eslint-fix":"eslint --fix --ext .js,.vue ./"},"repository":{"type":"git","url":"git+https://github.com/vuepress-reco/vuepress-plugin-extract-code.git"},"keywords":["vuepress-theme-reco","extract-code","vuepress"],"author":{"name":"reco_luan","email":"recoluan@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/vuepress-reco/vuepress-plugin-extract-code/issues"},"homepage":"https://vuepress-theme-reco.recoluan.com","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.4.0","eslint-plugin-vue":"^5.2.3"},"gitHead":"d7e4f1ff34e041c4b5af2b0b063ec1682b6d006b","_id":"@vuepress-reco/vuepress-plugin-extract-code@1.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-ZA6/0s4GJiMoXszOLa9ShHKm/Ldiba+dEfxZ9pMCmIlev2Z6hwden/YrV+YY/XsrfyTLD3veKB2a/U7FvxQO9A==","shasum":"a036a84a0ac29d10bcab0cd51edceca54903dfb0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@vuepress-reco/vuepress-plugin-extract-code/-/vuepress-plugin-extract-code-1.0.0.tgz","fileCount":10,"unpackedSize":23044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvBBCCRA9TVsSAnZWagAAblcP/1WncX+TuK6CcgAUcTX0\npJ210XUNhw+3qJZSRbsGUqZXmlC+3F+4VTimCgBA5Mv2XdPFUkVelCevwHV7\np8d/tkyoVLWqs0i9g9Rpcf6AQWXYS6pLzj02j/5LvbGS/O855Wrp5DnkrkkI\nxaJjEp4idY/8gPAO6qYLzx7tpdO5UwBW0mGFgHx3D+2NqzGPwL8b0L1hvezz\nVbXqw3bncZeI0FZhjSaEyZ6qXMuA0vji8/U/j6mav69e0hJZTA5Q/V7ZZaN8\nNWsNH3GklGGW/g+trPa9OgCL3YWmWzvBLOw8xa34ZfQenjZFEulfwBcQ6vcV\nQqT0dWsx/StoMZYqrjYJrrjpO7+1GWib1nf65h+J226n+siuzc2KA8fQ/hDa\n2aSlC8lgKaJKaKXqS9tZSPN5zEPBubdcHRkyAU1pc11i+IAUz1dds3IRdyn/\n4AeDD9ZPOW4unE1E6zxZsNW5/HAASCXyDmhgomzFDbwdN69JQhuf7S7U8P7K\nwOVKrHDAhGN+bCdJc9Dou64LRtdLo1ipeSMMfZYhm3YtRFozcup3IbImgJXy\nmtKqzICGWoyKO8Q6VdX7S9evwK6DgmLzUYOV6gwfDRY5SgKpvg/32YQH0+Nn\n3+awI5736qgr4VJ+alVjLwvSejQzk8rI0YvmmxHoeEjL3sjshpAp9bI4pkZg\nleJO\r\n=gzcZ\r\n-----END PGP SIGNATURE-----\r\n","size":8216},"maintainers":[{"name":"anonymous","email":"recoluan@outlook.com"}],"_npmUser":{"name":"anonymous","email":"recoluan@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-extract-code_1.0.0_1572606017639_0.10584687873448706"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T20:35:14.469Z","contributors":[]},"1.0.1":{"name":"@vuepress-reco/vuepress-plugin-extract-code","version":"1.0.1","description":"Features and code presentation plugin for vuepress-theme-reco or other vuepress theme","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","eslint-ext":"eslint --ext .js,.vue ./","eslint-fix":"eslint --fix --ext .js,.vue ./"},"repository":{"type":"git","url":"git+https://github.com/vuepress-reco/vuepress-plugin-extract-code.git"},"keywords":["vuepress-theme-reco","extract-code","vuepress"],"author":{"name":"reco_luan","email":"recoluan@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/vuepress-reco/vuepress-plugin-extract-code/issues"},"homepage":"https://vuepress-theme-reco.recoluan.com","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.4.0","eslint-plugin-vue":"^5.2.3"},"gitHead":"d7e4f1ff34e041c4b5af2b0b063ec1682b6d006b","_id":"@vuepress-reco/vuepress-plugin-extract-code@1.0.1","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-V98lcCmtA6IaDoWd6nTpWIALZfaZS6QvWYgyWGptDAPbcQd7bYM8sh4Tm7nfzgcjf9NOerduxl4ha8LUPMTlPg==","shasum":"8d9688a5ccd14765839cd2ad66fe3f3d3625386d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@vuepress-reco/vuepress-plugin-extract-code/-/vuepress-plugin-extract-code-1.0.1.tgz","fileCount":10,"unpackedSize":22832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvBZaCRA9TVsSAnZWagAAivsP/RlNbKvQB3Tb0C/hLcCV\nAf7d0X+mpL0BsLDJSrIIVoUwVRGX+fH3PVwQBqI+oEQrnINxIDWP1DYrfYQ+\nOwkFtBJAZImsxKHzSfYOtT93RAeXaUKy2HI62SFEekTh5FWkTW5aDTMsXuHT\nymW3h4ttMdTYDOziLS5O67wMYi9L6jJRTfTkeQOaJG7SIh61X0Tdy5kYTCdY\n/ZlE36n0/5B+Y8l1XhI/f3p0s//VVgpA+4atYW6san3e2HRif9lZ5HDk2x2V\nSGhEnzuIx8awMxoFq33BRyqgnkRi6PteIFW7A2Pyf2JWTm4j5cYCRDqa5wgz\nC+cpJx4lgh984ALPT1Fekx7PrSSSfq9kd1+pwtH/TyEvwCaN1kXkNXakcwcJ\nTMIyeDxJIJDTHrMeaJamU0cJrkVw1f2+rYOpq1s/4CeDw8H1K6x0JzkYyHRR\nT0drSc4tEI/Qd86lIHqA7EhI2l2FGZVTKOqb2MkcjAvFDpvUQO36mviwQKHK\n4lGwLisBldP4d3q5zbvLV7jU2xpedY9fzV3s9D/PROxXMZEk4n1aLxwzuqsz\nOGX2/IjfZSuVI+ztNcRAcCxLacaZ9VOejN86JyfqhbIgnbw5iHvPX/8xBL8a\nfZr55HvQXzDG7PgfmKCHATXYRGTZgwM5TjPziwqnGPQnWB7ssL5+FpQs+oCV\nmYBa\r\n=pIna\r\n-----END PGP SIGNATURE-----\r\n","size":8204},"maintainers":[{"name":"anonymous","email":"recoluan@outlook.com"}],"_npmUser":{"name":"anonymous","email":"recoluan@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-extract-code_1.0.1_1572607577705_0.29639842255821724"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T20:35:16.133Z","contributors":[]},"1.0.2":{"name":"@vuepress-reco/vuepress-plugin-extract-code","version":"1.0.2","description":"Features and code presentation plugin for vuepress-theme-reco or other vuepress theme","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","eslint-ext":"eslint --ext .js,.vue ./","eslint-fix":"eslint --fix --ext .js,.vue ./"},"repository":{"type":"git","url":"git+https://github.com/vuepress-reco/vuepress-plugin-extract-code.git"},"keywords":["vuepress-theme-reco","extract-code","vuepress"],"author":{"name":"reco_luan","email":"recoluan@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/vuepress-reco/vuepress-plugin-extract-code/issues"},"homepage":"https://vuepress-theme-reco.recoluan.com","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.4.0","eslint-plugin-vue":"^5.2.3"},"gitHead":"fd97dbdfb65fd17d2bb87ac92ce3df1f0cceb35c","_id":"@vuepress-reco/vuepress-plugin-extract-code@1.0.2","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+FoRemgPhn7yyczHN25hvZpq8IJ3rigPIOUWpyw2XGkMP848KUD6is8e6H93XGnL27zluazL/L9Qyzd8/YOZhw==","shasum":"b3595bc25b948f859fc33d8a82d65750dc0df94b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@vuepress-reco/vuepress-plugin-extract-code/-/vuepress-plugin-extract-code-1.0.2.tgz","fileCount":11,"unpackedSize":30632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvBpyCRA9TVsSAnZWagAAY2sP/R7xJKCLUZQvI2w6qOS4\nWZzjw6sOt1ZykOb7QlhNrzWDBDjKCfSWLF58bqkCGoTYRQow0L5FCaAxzR6e\n8xSQ9cZS+0n0veBeDkDv52oNyg8WXlV1CsKebEH1yAXmRrEb3icOjOnJiX5f\nmEPIsYhmt43HuR1Mp0QyRC9WlmcGL87xoFEQdJBQ/o4di305lX9YqgaFaBxX\nYhPJShr9hg5P+QoYA2F0/aD6LwjCeYoXl5VLGM85cDABRMxCLCZSYjlO9+JC\nD9PyiJDveIez42LXFPAsrl61t9GeSO+ukwbke7bsnTRALCqL+py8NaN/hv6W\nEQC+zNCuRRyIKEJMYBCigG4hfak0/X2w2UyQUJO9E/CnmyRFe3TrVPUzEApB\ni7rkhBq8xaf3I900SzeREZMaGu5YTcIKV/PLXPTDAiNFYoDHIbScMGfxtN/y\ntY3ayuZ8XK/ZVDDLe4u/YFLDYXMU9qxa1s6bCpoVO/ctzW811s4QEzRKkXhp\nWg7YD450jhv5Fm9g5p8F96jSHLG669gpAiVCBWnsms6hvI8xs5fOF1jH+VAR\nNDDCOzwdDFbnvJPGo/jXX5Qk05Q2GntPGr7mMxhSotvZlJc8YdK62OEpDFpP\nYoC6UrzcGfhorNSpsA/7sTD0yrrVTeJyr+IkkJTtxapcDZe1d9x2oJoEBcvm\nbcGg\r\n=HKUS\r\n-----END PGP SIGNATURE-----\r\n","size":16679},"maintainers":[{"name":"anonymous","email":"recoluan@outlook.com"}],"_npmUser":{"name":"anonymous","email":"recoluan@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-extract-code_1.0.2_1572608626104_0.8912220179483896"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T20:35:17.794Z","contributors":[]},"1.0.3":{"name":"@vuepress-reco/vuepress-plugin-extract-code","version":"1.0.3","description":"Features and code presentation plugin for vuepress-theme-reco or other vuepress theme","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","eslint-ext":"eslint --ext .js,.vue ./","eslint-fix":"eslint --fix --ext .js,.vue ./"},"repository":{"type":"git","url":"git+https://github.com/vuepress-reco/vuepress-plugin-extract-code.git"},"keywords":["vuepress-theme-reco","extract-code","vuepress"],"author":{"name":"reco_luan","email":"recoluan@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/vuepress-reco/vuepress-plugin-extract-code/issues"},"homepage":"https://vuepress-theme-reco.recoluan.com","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.4.0","eslint-plugin-vue":"^5.2.3"},"gitHead":"47f10a5870af87473662fb95f5a16624c0d9e0d4","_id":"@vuepress-reco/vuepress-plugin-extract-code@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"anonymous","email":"recoluan@outlook.com"},"dist":{"integrity":"sha512-b8NQKZfGMybIrmLKQp3NQO4zo+hzOEOBzHT6gYOc9Lc0YCB3ZziTniVIUApbGVE7SJYnDFVZrTAWCzrfl+fipA==","shasum":"aed545a2ef13f52d92c1c904efc2225c89b99d2c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@vuepress-reco/vuepress-plugin-extract-code/-/vuepress-plugin-extract-code-1.0.3.tgz","fileCount":11,"unpackedSize":31456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvpz5CRA9TVsSAnZWagAAuBEQAIpQ9nDu9RpMBYyfPDhw\n/amsyC5e7nJmBEsE/OF/U/dUkOHMhebqNPg7qsA+HbVBGcclgWPwsen9j5/W\nzDFh99qZ5hzkFlURJ9y7SvVqi/1/IfCP3tWD//i4Nm7fY5U33ENjt3ncyBgX\nnH9UaeJKbjNRyCWB4wA/rD9I0KHdJgAQaglnkumP1TVIo2wDTXGxGO+FRypJ\nmnOJ3vFGmnh0hbHMeaOkan71nDZNERWxtYQQ4U2v5Dk+t13SibL02C2gEyi9\nYw6nM6wR6KyswkcVGHN9Yr+U1FMt7e7UVFfg0xKnx9IbptdpX/lHO4BWn7da\n0COGbiOxDcaje0ZzMCLKKP8NCJs6fMXYBDQUdGQlAcUDC1JQJ7WgBdGNfD8e\nqOlj62ULX7nYQdgcNUhiUHpUOpVK/JTDPIxqCJ+Wd0+wLvhQt5vNKoBvV5xI\nBVoDohSuMU60QpOXeGecA12lSSAC4NgkAQEBdFUYRULniU5CPiWSiVpvS72y\nEqUg4EH4F/tg0yeXTXwK1H15ROBWR9FC1wMWSj5UML5pWLVPW/aOWEzFLn4P\nV7DSoGDVC7XlJ06Pfy8rxCX8pgm9nmzZwPWZYKubig8J83lOJszW59ANa0qt\nFptp7W2FyOs856xwLXC/MHY4McvKmpVmqoaKpGC+n2ZVoBDxaCs50UYcpVOu\ntG13\r\n=L+a1\r\n-----END PGP SIGNATURE-----\r\n","size":16789},"maintainers":[{"name":"anonymous","email":"recoluan@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-extract-code_1.0.3_1572773112866_0.16144312248043957"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T20:35:19.437Z","contributors":[]},"1.0.4":{"name":"@vuepress-reco/vuepress-plugin-extract-code","version":"1.0.4","description":"Features and code presentation plugin for vuepress-theme-reco or other vuepress theme","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","eslint-ext":"eslint --ext .js,.vue ./","eslint-fix":"eslint --fix --ext .js,.vue ./"},"repository":{"type":"git","url":"git+https://github.com/vuepress-reco/vuepress-plugin-extract-code.git"},"keywords":["vuepress-theme-reco","extract-code","vuepress"],"author":{"name":"reco_luan","email":"recoluan@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/vuepress-reco/vuepress-plugin-extract-code/issues"},"homepage":"https://vuepress-theme-reco.recoluan.com","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.4.0","eslint-plugin-vue":"^5.2.3"},"gitHead":"9592b2f58b81ecb49231220c06324489efed1e48","_id":"@vuepress-reco/vuepress-plugin-extract-code@1.0.4","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-J4Cas3JRxs0TnfjtzQ+3bl7iNwL/va9cOXMtpayse3sETul863BwYk1vEBXRAZMiLmbmWqnBrGIrJGmD/TnO5Q==","shasum":"c50b521d8a5d1c9dfd705e245a7e920a80315a32","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@vuepress-reco/vuepress-plugin-extract-code/-/vuepress-plugin-extract-code-1.0.4.tgz","fileCount":11,"unpackedSize":30632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJempg+CRA9TVsSAnZWagAA+wgP/0aW1AYfni1eUfFUHeru\nt410YRc0zqmUmFxNXsbyjoRqDCOsqXvZzHc/Px2O5Dr80gAw4q8aC4iA9b30\n2tUmFF5RA0yksJnztQQ3jHD49Q/7N700l7/SkFRm8/pwOMBHjCRokW4z8/ay\nIFhF2mGXqwNQ3x6J0rWmwIQmrZMtd+v80RmTOw/+hxlxe4wCyR85HD1Vigb5\nsQbB98r69OK6m4RKq2PISuEx9TxCoDqErprqi/9hfVE7YRcSkavQMlm87pBT\n+btc1EAa4PnlPah0Y4qReOvrKAtIqwjsL2miKCdDRwhKtmkB7uWJ1Siq73hj\nxJwKh7v20e2dm6taAxDsYWNi63L/FOMhyD9TBnYXlWz9dj+EvMBzRfrgLX0U\nXvS5DG2Bif3cPMRWMipRf+cV/lARyZFvkSrSFc8tKFRCpEgxDo0PTZzMQ6CB\n08EKH8bJiQjo5NQUfGDVdf3dJhY5tGiR+Ew78wmjsLOhD8YjrmntyKxVBg/h\n2lJBJmgyEwz4xqzlk+ciF5/phwxd8lnCKOLdb88oUz/y/v/Lk70a1IkI7Bua\njgvjItytx1vEpGxIJPK7KieFR6Hq+1CEQyZo58ZnDrSqSj5m9DEUl0+BDgCv\np9zGsa+vpqZqcLIo+WJL9YQNp3kgqkAWSysDLxlMV7tpGDP2NNX/p/BN4FAK\ntGDd\r\n=iW17\r\n-----END PGP SIGNATURE-----\r\n","size":16690},"maintainers":[{"email":"recoluan@outlook.com","name":"anonymous"},{"email":"zsw0407@outlook.com","name":"anonymous"}],"_npmUser":{"name":"anonymous","email":"recoluan@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vuepress-plugin-extract-code_1.0.4_1587189821980_0.36376439387402804"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T20:35:21.730Z","contributors":[]}},"dist-tags":{"latest":"1.0.4"},"name":"@vuepress-reco/vuepress-plugin-extract-code","time":{"created":"2022-01-27T09:05:46.089Z","modified":"2023-07-28T02:24:24.857Z","1.0.0":"2019-11-01T11:00:17.864Z","1.0.1":"2019-11-01T11:26:17.827Z","1.0.2":"2019-11-01T11:43:46.303Z","1.0.3":"2019-11-03T09:25:13.003Z","1.0.4":"2020-04-18T06:03:42.136Z"},"readme":"# @vuepress-reco/vuepress-plugin-extract-code\n\n## Introduce\n\nFeatures and code presentation plugin for vuepress-theme-reco or other vuepress theme.\n\n![demo](./bin/demo.png)\n\n### Name\n\n- **As plugin**: `@vuepress-reco/vuepress-plugin-extract-code`\n\n## Usage\n\n### 修改 `config.js`\n\n```js\nmodule.exports = {\n  plugins: [\n    '@vuepress-reco/extract-code'\n  ]\n}\n```\n\n### 展示 `VUE` 组件\n\n> `@` 是当前项目目录的别名\n\n```html\n<RecoDemo>\n  <template slot=\"code-template\">\n    <<< @/docs/.vuepress/demo/demo.vue?template\n  </template>\n  <template slot=\"code-script\">\n    <<< @/docs/.vuepress/demo/demo.vue?script\n  </template>\n  <template slot=\"code-style\">\n    <<< @/docs/.vuepress/demo/demo.vue?style\n  </template>\n</RecoDemo>\n```\n\n### 随意组合想展示的代码\n\n比如，你想展示 `html` 代码，需要将插槽名字改为 `code-html`，然后将文件指向对应的文件即可。\n\n```html\n<RecoDemo>\n  <template slot=\"code-html\">\n    <<< @/docs/.vuepress/config/nav/index.html\n  </template>\n  <template slot=\"code-css\">\n    <<< @/docs/.vuepress/config/nav/style.css\n  </template>\n  <template slot=\"code-js\">\n    <<< @/docs/.vuepress/config/nav/index.js\n  </template>\n</RecoDemo>\n```\n\n### 展示代码效果\n\n如果你想同时展示你的案例的显示效果，可以通过 `demo` 这个插槽来操作：\n\n#### 1. 可以通过 `img` 标签去展示效果截图\n\n  ```html\n  <RecoDemo>\n    <template slot=\"code-template\">\n      <<< @/docs/.vuepress/demo/demo.vue?template\n    </template>\n    <template slot=\"code-script\">\n      <<< @/docs/.vuepress/demo/demo.vue?script\n    </template>\n    <template slot=\"code-style\">\n      <<< @/docs/.vuepress/demo/demo.vue?style\n    </template>\n\n    <img src=\"./images/demo.png\" slot=\"demo\" />\n  </RecoDemo>\n  ```\n\n#### 2. 当然，如果可以将展示效果写成一个 `vue` 组件的话，可以这样来展示：\n\n```html\n<RecoDemo>\n  <template slot=\"code-template\">\n    <<< @/docs/.vuepress/demo/demo.vue?template\n  </template>\n  <template slot=\"code-script\">\n    <<< @/docs/.vuepress/demo/demo.vue?script\n  </template>\n  <template slot=\"code-style\">\n    <<< @/docs/.vuepress/demo/demo.vue?style\n  </template>\n\n  <some-demo slot=\"demo\"></some-demo>\n</RecoDemo>\n```\n\n只要你的组件可以在 `.md` 文件中正常使用就可以，你可以把这些组件放在 `.vuepress/components` 下；可以通过官方注册插件 `@vuepress/plugin-register-components` 去注册组件；可以通过组件的方式去注入。\n\n#### 3. 另外，如果你想要展示的案例代码就是一个独立的可以显示效果的功能组件，那最方便不过了，因为这个组件既可以作为代码来源，又可以用来显示效果：\n\n```html\n<RecoDemo>\n  <template slot=\"code-template\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?template\n  </template>\n  <template slot=\"code-script\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?script\n  </template>\n  <template slot=\"code-style\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?style\n  </template>\n\n  <some-demo slot=\"demo\"></some-demo>\n</RecoDemo>\n```\n\n### 展示不具名的代码\n\n如果你的代码只是某个代码块，可以直接在文本里写，这样很方便，不需要去建立一个文件，但是这样不会显示代码高亮的。\n\n```html\n<RecoDemo :collapse=\"true\">\n  <template slot=\"code-js\">\n    <pre>\n      console.log(`I'm reco_luan.`)\n    </pre>\n  </template>\n</RecoDemo>\n```\n\n但是这样还有一个缺点，就是会有多余的代码缩进，可以这样粗暴解决：\n\n<RecoDemo :collapse=\"true\">\n<template slot=\"code-js\">\n<pre>\nconst a = 1\na.b = 1\n</pre>\n</template>\n</RecoDemo>\n\n### 默认显示代码块\n\n代码展示默认是隐藏的，点击左上角的按钮才可以显示，可以把 `collapse` 设置为 `true` 来默认显示代码：\n\n```html\n<RecoDemo :collapse=\"true\">\n  <template slot=\"code-template\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?template\n  </template>\n  <template slot=\"code-script\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?script\n  </template>\n  <template slot=\"code-style\">\n    <<< @/docs/.vuepress/demo/some-demo.vue?style\n  </template>\n\n  <some-demo slot=\"demo\"></some-demo>\n</RecoDemo>\n```","users":{}}