Socket
Socket
Sign inDemoInstall

react-docgen-typescript-loader

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-docgen-typescript-loader

Webpack loader to generate docgen information from TypeScript React components.


Version published
Weekly downloads
197K
decreased by-10.68%
Maintainers
1
Weekly downloads
 
Created

What is react-docgen-typescript-loader?

The react-docgen-typescript-loader is a webpack loader that uses react-docgen-typescript to parse TypeScript React components and generate documentation from them. It is particularly useful for creating documentation for React components written in TypeScript, as it extracts prop types, default values, and descriptions from the TypeScript code.

What are react-docgen-typescript-loader's main functionalities?

Generate Documentation

This feature allows you to generate documentation for your TypeScript React components by integrating the react-docgen-typescript-loader into your webpack configuration. The loader will parse your TypeScript files and extract documentation information.

module.exports = {
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: [
          {
            loader: 'react-docgen-typescript-loader',
            options: {
              // Options for react-docgen-typescript
            }
          }
        ]
      }
    ]
  }
};

Customizing Documentation Output

This feature allows you to customize the output of the documentation by providing options to the react-docgen-typescript-loader. In this example, the propFilter option is used to exclude props coming from node_modules.

module.exports = {
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: [
          {
            loader: 'react-docgen-typescript-loader',
            options: {
              propFilter: (prop) => prop.parent ? !/node_modules/.test(prop.parent.fileName) : true
            }
          }
        ]
      }
    ]
  }
};

Other packages similar to react-docgen-typescript-loader

Keywords

FAQs

Package last updated on 29 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc