Gathering detailed insights and metrics for vuepress-plugin-demo-block
Gathering detailed insights and metrics for vuepress-plugin-demo-block
Gathering detailed insights and metrics for vuepress-plugin-demo-block
Gathering detailed insights and metrics for vuepress-plugin-demo-block
npm install vuepress-plugin-demo-block
Typescript
Module System
Node Version
NPM Version
75.2
Supply Chain
99.5
Quality
75.9
Maintenance
100
Vulnerability
100
License
JavaScript (89.06%)
CSS (10.37%)
Shell (0.56%)
Total Downloads
328,670
Last Day
177
Last Week
1,074
Last Month
5,271
Last Year
71,832
113 Stars
65 Commits
24 Forks
18 Branches
2 Contributors
Latest Version
0.7.2
Package Id
vuepress-plugin-demo-block@0.7.2
Unpacked Size
28.69 kB
Size
8.45 kB
File Count
6
NPM Version
6.4.1
Node Version
8.15.0
Cumulative downloads
Total Downloads
Last day
-2.7%
177
Compared to previous day
Last week
-15.2%
1,074
Compared to previous week
Last month
-1.5%
5,271
Compared to previous month
Last year
-13%
71,832
Compared to previous year
The Demo Block is used to help you add vue, react or native js examples when writing a document. When writing component documentation, you usually need to add some related examples to the document. These examples can usually be implemented using JSFiddle or Codepen's Iframe, but the maintenance cost will be relatively high. You can quickly add examples by using Demo Block, and it is very convenient to modify.
To show how to write the example, the three points used to mark the end of the code section are separated by spaces, and the spaces need to be removed when used.
Reference official document Vuepress
npm i vuepress-plugin-demo-block --save-dev
config.js
1module.exports = { 2 head: [ 3 ['script', { src: 'https://cdn.jsdelivr.net/npm/react/umd/react.production.min.js' }], 4 ['script', { src: 'https://cdn.jsdelivr.net/npm/react-dom/umd/react-dom.production.min.js' }], 5 ['script', { src: 'https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js' }], 6 ['script', { src: 'https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js' }], 7 ], 8 plugins: [ 9 'demo-block' 10 ] 11} 12
Write the following code in the Markdown file:
1::: demo 2```html 3<template> 4 <div class="box-vue">Vue {{ message }}</div> 5</template> 6<script> 7export default { 8 data: () => ({ message: 'Hello World' }) 9} 10</script> 11<style> 12.box-vue { color: red; } 13</style> 14` ` ` <= delete spaces here 15:::
1::: demo [react] 2```js 3export default class App extends React.Component { 4 constructor (props) { 5 super(props) 6 this.state = { message: 'Hello World' } 7 } 8 render () { 9 return ( 10 <div className="box-react"> 11 React {this.state.message} 12 </div> 13 ) 14 } 15} 16App.__style__ = ` 17 .box-react { color: red; } 18` 19` ` ` <= delete spaces here 20:::
1::: demo [vanilla] 2```html 3<html> 4 <div id="vanilla-box"></div> 5</html> 6<script> 7 var box = document.getElementById('vanilla-box') 8 box.innerHTML = 'Hello World!' 9</script> 10<style> 11#vanilla-box { 12 color: red; 13} 14</style> 15` ` ` 16:::
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
84 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More