Gathering detailed insights and metrics for vue-docgen-loader
Gathering detailed insights and metrics for vue-docgen-loader
Gathering detailed insights and metrics for vue-docgen-loader
Gathering detailed insights and metrics for vue-docgen-loader
npm install vue-docgen-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
13 Stars
63 Commits
4 Forks
2 Watchers
1 Branches
4 Contributors
Updated on Oct 29, 2024
Latest Version
2.0.1
Package Id
vue-docgen-loader@2.0.1
Unpacked Size
12.07 kB
Size
4.69 kB
File Count
6
NPM Version
10.7.0
Node Version
18.20.4
Published on
Oct 29, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
2
This package allows parsing Vue component file with vue-docgen-api then injecting the result into the output file.
First, install the loader and vue-docgen-api.
1$ yarn add -D vue-docgen-loader vue-docgen-api 2# or npm 3# $ npm i -D vue-docgen-loader vue-docgen-api
Then add the loader to your webpack config file. Please make sure to run the loader at the last of the loader chain.
1import MyComponent from './my-component.vue' 2 3Vue.extend({ 4 // You can use the components as usual 5 components: { MyComponent } 6})
1// webpack.config.js 2module.exports = { 3 module: { 4 rules: [ 5 { 6 test: /\.vue$/, 7 use: 'vue-loader' 8 }, 9 { 10 // You also can put this loader above, but I recommend to use 11 // a separeted rule with enforce: 'post' for maintainability 12 // and simplicity. For example, you can enable the loader only 13 // for development build. 14 test: /\.vue$/, 15 use: 'vue-docgen-loader', 16 enforce: 'post' 17 } 18 ] 19 }, 20 plugins: [new VueLoaderPlugin()] 21}
If you want to apply this loader to non-SFC files like below, you also need to setup a rule for them. This works only with vue-docgen-api >= 4.0.0.
1// my-button.js 2import Vue from 'vue' 3 4export const MyButton = Vue.extend({ 5 props: { 6 foo: { 7 type: String 8 } 9 }, 10 template: '<button/>' 11})
1// other.js 2import MyButton from './my-button.js?component'
1// webpack.config.js 2module.exports = { 3 module: { 4 rules: [ 5 // Please make sure to apply the loader only for Vue components: In this 6 // sample, only modules imported with ?component query will match. 7 // 8 // IMPORTANT! 9 // Do not use ?vue query if you're using vue-loader. It will sliently inject 10 // .js?vue rule into rules array and it breaks the module. 11 { 12 test: /\.js$/, 13 resourceQuery: /component/, 14 use: 'vue-docgen-loader', 15 enforce: 'post' 16 } 17 ] 18 } 19}
You can pass options for vue-docgen-api through docgenOptions
and specify the property name the loader inject docgen result at.
1{ 2 test: /\.vue$/, 3 loader: 'vue-docgen-loader', 4 options: { 5 docgenOptions: { 6 // options for vue-docgen-api... 7 }, 8 // Injected property name 9 injectAt: '__docgenInfo' // default 10 }, 11 enforce: 'post' 12}
Please read our contributing guidelines.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/25 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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
Score
Last Scanned on 2025-07-07
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