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
react-docgen-typescript-loader
Webpack loader to generate docgen information from TypeScript React components.
vue-docgen-api
Toolbox to extract information from Vue component files for documentation generation purposes.
vue-inbrowser-compiler-independent-utils
the part of vue-inbrowser-compiler-utils that contains no vue dependency
react-docgen-typescript
[![Build Status](https://github.com/styleguidist/react-docgen-typescript/actions/workflows/nodejs.yml/badge.svg)](https://github.com/styleguidist/react-docgen-typescript/actions/workflows/nodejs.yml)
npm install vue-docgen-loader
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
13 Stars
63 Commits
4 Forks
3 Watching
1 Branches
4 Contributors
Updated on 29 Oct 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-9.5%
24,881
Compared to previous day
Last week
-1.3%
133,883
Compared to previous week
Last month
14.7%
560,149
Compared to previous month
Last year
-30%
10,593,386
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 dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
6 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 2/25 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
Score
Last Scanned on 2024-11-18
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