{"_id":"@boydaihungst/vue-doc-preview","_rev":"2-39f7285c0c77b96396bfc1db0d521119","name":"@boydaihungst/vue-doc-preview","dist-tags":{"latest":"0.3.3"},"versions":{"0.3.2":{"name":"@boydaihungst/vue-doc-preview","version":"0.3.2","description":"A vue document preview component","author":{"name":"cainsyake","url":"cainsyake@qq.com"},"scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build ./test/index.ts","lint":"vue-cli-service lint","build-lib":"vue-cli-service build --target lib --name vueDocPreview ./src/index.ts","test":"vue-cli-service serve ./test/index.ts","vetur":"vue-int --input src --output vetur --recursive"},"main":"./dist/vueDocPreview.umd.min.js","dependencies":{"@types/marked":"^2.0.2","axios":"^0.18.0","core-js":"^3.8.3","highlight.js":"^10.7.2","marked":"^2.0.3"},"devDependencies":{"@babel/core":"^7.12.16","@babel/eslint-parser":"^7.12.16","@typescript-eslint/eslint-plugin":"^4.18.0","@typescript-eslint/parser":"^4.18.0","@vue/cli-plugin-babel":"~5.0.0-alpha.8","@vue/cli-plugin-eslint":"~5.0.0-alpha.8","@vue/cli-plugin-typescript":"~5.0.0-alpha.8","@vue/cli-service":"~5.0.0-alpha.8","@vue/eslint-config-prettier":"^6.0.0","@vue/eslint-config-standard":"^6.0.0","@vue/eslint-config-typescript":"^7.0.0","babel-helper-vue-jsx-merge-props":"^2.0.3","babel-plugin-syntax-jsx":"^6.18.0","babel-plugin-transform-vue-jsx":"^3.7.0","babel-preset-env":"^1.7.0","eslint":"^7.20.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.3.x","eslint-plugin-promise":"^4.3.1","eslint-plugin-vue":"^7.6.0","iview":"^3.0.0","less":"^3.0.4","less-loader":"^4.1.0","typescript":"^4.2.4","vue":"^3.0.0","vue-intellisense":"^0.2.1","webpack-bundle-analyzer":"^4.4.1"},"postcss":{"plugins":{"autoprefixer":{}}},"browserslist":["> 1%","last 2 versions","not ie <= 8"],"bugs":{"url":"https://github.com/cainsyake/vue-doc-preview/issues","email":"cainsyake@qq.com"},"keywords":["document","markdown","preview"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cainsyake/vue-doc-preview.git"},"vetur":{"tags":"vetur/tags.json","attributes":"vetur/attributes.json"},"gitHead":"193f028bae864eabe0365f6469bb3b9011338567","homepage":"https://github.com/cainsyake/vue-doc-preview#readme","_id":"@boydaihungst/vue-doc-preview@0.3.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-S4k7nyYj6/YXdqrUck5Fu6zJHGB8Vi1GqcDXeDDk9yXvTB7h7y4yrD3wlpcPCBrz1WyM7H1s4Rx5Eh3WTo0q2A==","shasum":"13861e1682646f847d644b59643a5644ac81cfd9","tarball":"https://registry.npmjs.org/@boydaihungst/vue-doc-preview/-/vue-doc-preview-0.3.2.tgz","fileCount":39,"unpackedSize":4058459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeNdHCRA9TVsSAnZWagAAzc0QAIbuMyJDnfrRT0wEs5eZ\n2Tie6RQ6JTrPwqlhh2SZh+DqJTQ8Ddp5mW3hRiX9yahPLBYrZtXGlZOhgVWz\nNKZw/eug1/culChzkDEMk6H6Z1UQGJlosBwEqSPPGkcaNdJ+wLh0AqReE9B9\ngJxpOpW/UsePhf4ZxFswub3eR5H9oCW5JZu+MuaD+eflKY3+kIa9AgEn/ud7\nNe4GTXmXbslM0D2ff7mcavs3eyZMR1sdBT7POMCL0Fi1eDRTwycBsxVUmhWr\nj9o/0ya/z9yviGeIi0uhkBQ+VsYKNtw+VG4V+CqtdhHjGwTGBVIH9gkhGY52\nG557xfaab7BHZ4CbsSgDedgpQDnVxaXx8X57/Qi3Uv7xNAtMYnf/LPK0wRcR\nEPWqKiNlRlbdCklzBA4ZsK7YaD5GrlqN6kKv7bEM3ePOJOGGCJLOszGeZ1VJ\nKygc0k2SKc11xuLb8ArA/ipjb1AyndRlSeH9x8Z6974otBuUJ3xrhxJN0vCK\nMsUCAeJoG3OxDfNPMA9wSaqxdy9n9dsYOLdkun3N3HCk991hUMdOtOD0ECHw\nOkdgY3zOENgmS8Ze9hGeWA3E2zw/VxmgY3nYpdzopgkYm0GebBElhkmYfGgM\nb+XOhTkCgxMDcfAe14jAAu6Wo5XDFPLEK8S4GXVTEeseB7ZgEalsCsCi2+f3\nj579\r\n=wljS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxervhu3RzjsMkTcjUdAhQCU23LWOu/BGr7VRnOCzmPAiEAheEz063s9vI57itjoaG5H2oI9V87GHcJ/VfIGlzU4aM="}]},"_npmUser":{"name":"boydaihungst","email":"boydaihungst@gmail.com"},"directories":{},"maintainers":[{"name":"boydaihungst","email":"boydaihungst@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-doc-preview_0.3.2_1618532166705_0.3990520546296834"},"_hasShrinkwrap":false},"0.3.3":{"name":"@boydaihungst/vue-doc-preview","version":"0.3.3","description":"A vue document preview component","author":{"name":"cainsyake","url":"cainsyake@qq.com"},"scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build ./test/index.ts","lint":"vue-cli-service lint","build-lib":"vue-cli-service build --target lib --name vueDocPreview ./src/index.ts","test":"vue-cli-service serve ./test/index.ts","vetur":"vue-int --input src --output vetur --recursive"},"main":"./dist/vueDocPreview.umd.min.js","dependencies":{"@types/marked":"^2.0.2","axios":"^0.21.1","core-js":"^3.8.3","highlight.js":"^10.7.2","marked":"^2.0.3"},"devDependencies":{"@babel/core":"^7.12.16","@babel/eslint-parser":"^7.12.16","@typescript-eslint/eslint-plugin":"^4.18.0","@typescript-eslint/parser":"^4.18.0","@vue/cli-plugin-babel":"~5.0.0-alpha.8","@vue/cli-plugin-eslint":"~5.0.0-alpha.8","@vue/cli-plugin-typescript":"~5.0.0-alpha.8","@vue/cli-service":"~5.0.0-alpha.8","@vue/eslint-config-prettier":"^6.0.0","@vue/eslint-config-standard":"^6.0.0","@vue/eslint-config-typescript":"^7.0.0","babel-helper-vue-jsx-merge-props":"^2.0.3","babel-plugin-syntax-jsx":"^6.18.0","babel-plugin-transform-vue-jsx":"^3.7.0","babel-preset-env":"^1.7.0","eslint":"^7.20.0","eslint-plugin-import":"^2.20.2","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.3.x","eslint-plugin-promise":"^4.3.1","eslint-plugin-vue":"^7.6.0","iview":"^3.0.0","less":"^4.1.1","less-loader":"^8.1.1","typescript":"^4.2.4","vue":"^3.0.0","vue-intellisense":"^0.2.1","webpack-bundle-analyzer":"^4.4.1"},"postcss":{"plugins":{"autoprefixer":{}}},"browserslist":["> 1%","last 2 versions","not ie <= 8"],"bugs":{"url":"https://github.com/cainsyake/vue-doc-preview/issues","email":"cainsyake@qq.com"},"keywords":["document","markdown","preview"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cainsyake/vue-doc-preview.git"},"vetur":{"tags":"vetur/tags.json","attributes":"vetur/attributes.json"},"gitHead":"6654a422591c1563c0e07a85b9812317afd8447c","homepage":"https://github.com/cainsyake/vue-doc-preview#readme","_id":"@boydaihungst/vue-doc-preview@0.3.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-UQhHoHwJgcGELIlx5Vj8iIVEzee5PwTsP03o1hfpf3uIdCEKV9MZb9g6V2OSdg7aipbTYPXcAo6ylrrMmB25jw==","shasum":"1e60e536be926a794150101e44d67197696c29ca","tarball":"https://registry.npmjs.org/@boydaihungst/vue-doc-preview/-/vue-doc-preview-0.3.3.tgz","fileCount":38,"unpackedSize":3787445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeNzqCRA9TVsSAnZWagAAEpcP/iLGJbGamPZgfFXln9a7\ntEkzAF5FS4DG7+kAb+Yxslc+MzU+s0QvoJZFRM3rcHSgvZ5nKpsc5+XnzsRH\nViZ9Aht0+9B4wCMpZpEMbhcMT5iaUY5D5VCEpTFT54lWxsztCkgN/lXNhjWv\nH3l29+MT+EJPAk5b3cZ6T3RIuPjce50XKb6zc8JxWBz27gVvM/27P8dUWhbO\n9yDiWjC6C7ChRYiR/W13HQlRQlyohMLYQtx9stWcgp58CJ4J3YVt4epv5z8w\nEP6XvGibWodsWj8XdlTI1DN0eGiG8QiSoOA3t28ToMWPYYpt5iSsOo8Zas1I\nYC4MaVaDupWgTDpOz2JJOIonscv6XpKL/kfDXOiL6PaNXzjZhdm6Sb9QVntr\nUK/m+4c/9JLkgNRrfoVt2vkbmDNsj/t9KPNjdUgMlwxOC2uSdIKM7okTdPiQ\nmGCZddm9zoilf1gKVzUGUqlZ607XfsvEkNeGHkE5bPjfOP+m57rJ4ilY/I25\nPPlVqkmnO7XAkFfIKvZVsbPl8YHP4E+kYEbF22r8TtqUHkXY6acgcTJ4Wnz7\nbTOh7HHHEg7sYPZWMV+jUOeK/4qBro0p2OKdprHI3wGhOc9vUmpvT/VZh1eO\nS0F1WHBXSGH1JV/pI8/F2LOqTuqfYcgG/6K9HWnRuf1bT/nApE2wZlK/05S9\n5PuZ\r\n=WnVF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAuRONxtkdx2SptUa3CLXPa4bJiBJOdSX7exS2nzUBziAiEAzWnP3oPdufolBJHb7Pgz+H/w+IS5jjA1i1X+PZArl7A="}]},"_npmUser":{"name":"boydaihungst","email":"boydaihungst@gmail.com"},"directories":{},"maintainers":[{"name":"boydaihungst","email":"boydaihungst@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-doc-preview_0.3.3_1618533610036_0.8432062517048808"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-16T00:16:06.618Z","0.3.2":"2021-04-16T00:16:06.967Z","modified":"2022-04-04T20:18:27.951Z","0.3.3":"2021-04-16T00:40:10.290Z"},"maintainers":[{"name":"boydaihungst","email":"boydaihungst@gmail.com"}],"description":"A vue document preview component","homepage":"https://github.com/cainsyake/vue-doc-preview#readme","keywords":["document","markdown","preview"],"repository":{"type":"git","url":"git+https://github.com/cainsyake/vue-doc-preview.git"},"author":{"name":"cainsyake","url":"cainsyake@qq.com"},"bugs":{"url":"https://github.com/cainsyake/vue-doc-preview/issues","email":"cainsyake@qq.com"},"license":"MIT","readme":"# vue-doc-preview\nA vue document preview component, this component will display the contents of the document on the page.\n\nEnglish Readme | [中文说明书](https://github.com/cainsyake/vue-doc-preview/blob/master/README-CN.md)\n\n[Live Demo](http://vdp.cainsyake.com/)\n\n## Use\n### import\nFirst, add this package from yarn or npm.\n```\nyarn add vue-doc-preview\nor\nnpm i vue-doc-preview --save\n```\nThen, import this component in .vue file.\n```javascript\n<template>\n  <VueDocPreview :value=\"docValue\" :type=\"docType\" />\n</template>\n\n<script>\nimport VueDocPreview from 'vue-doc-preview'\nexport default {\n  components: {\n    VueDocPreview\n  }\n}\n</script>\n```\nYou also can open demo.vue(which in src) to learn how to use this component, but it is introduced directly to the component from the source code.\n\n### Example\n```html\n<VueDocPreview value=\"# VueDocPreview\\n**Markdown Test**```\" type=\"markdown\" />\n<VueDocPreview value=\"newteach.pbworks.com%2Ff%2Fele%2Bnewsletter.docx\" type=\"office\" />\n<VueDocPreview value=\"Normal Text\" type=\"text\" />\n<VueDocPreview value=\"function () {\\n  console.log('VueDocPreview')\\n}\" type=\"code\" code=\"javascript\"/>\n```\n\n## Config\n\nprop | description | type| default\n:-------: | -------  |  :-------:  |  :-------:\nvalue | document contents or office document's url | String | ''\ntype | document type (Now supported types are 'markdown'、'office'、'text' of 'code') | String | 'md'\nlanguage | code language (It takes effect only when the type is 'code') | String | ''\nheight | when height > 100 it means that the component's height is hight+'px', otherwise it means that the component's height is hight+'%'| Number | 90\nmdStyle | markdown view custom style (It takes effect only when the type is 'markdown' or 'code') | Object | null\ntextStyle | text view custom style (It takes effect only when the type is 'text') | Object | null\nurl | document's url, but it only takes effect only when we don't set value (this property can also be used in office documents)| String | ''\nrequestConfig | [axios config](https://github.com/axios/axios#request-config) | Object | {}\n\n### Supported document types and their suffix(language)\n* markdown: md\n* office: docx, pptx, xlsx\n* text: txt\n* code: javascript(js)、html、css、java、json、typescript(ts)、cpp、xml、bash、less、nginx、php、powershell、python、scss、shell、sql、yaml、ini\n\n### Custom style\nNow, we can customize markdown view style by setting mdStyle in props.\n\nThese tags can be customized: pre, code, ul, ol, li, hr, blockquote, img, a, table, tr, th, td.\n\nIn this **example** we will customize the style of code block in markdown view.\n```javascript\n// template\n<VueDocPreview value=\"# VueDocPreview\" type=\"markdown\" :mdStyle=\"mdStyle\" />\n\n// script\nexport default {\n  data: function() {\n    return {\n      mdStyle: {\n        pre: {\n          'background-color': 'rgb(187, 255, 255)'\n        },\n        code: {\n          'background-color': 'rgb(187, 255, 255)',\n          'line-height': '20px'\n        }\n      }\n    }\n  }\n}\n```\n\n## Development\n\n### Compiles and hot-reloads for development\n```\nyarn run serve\n```\n\n### Compiles and minifies for production\n```\nyarn run build-lib\n```\n\n### Run test for development\n```\nyarn run test\n```\n\n### Lints and fixes files\n```\nyarn run lint\n```\n\n### Some tips\n1. Markdown preview use highlight.js to make code show different colors, you are able to modify src/lib/highlight.js to support more language with code highlight.\n2. You can debug the components after development by running the test environment.\n3. You can show document by a url and this component will automatically download it by the url.\n4. The priority of prop **value** is higher than that of prop **url**, if you set prop value with a nonempty value, the prop url will be ignored.\n\n## License\nMIT\n","readmeFilename":"README.md"}