Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

structure-graph-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

structure-graph-webpack-plugin

A webpack plugin to generate project structure graph

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

structure-graph-webpack-plugin

npm

A webpack plugin to generate project structure graph

Table of Contents

  1. Installation
  2. Usage
  3. Issues
  4. License

Installation

  npm i --save-dev structure-graph-webpack-plugin
  yarn add --dev structure-graph-webpack-plugin

Usage

Here's an example webpack config illustrating how to use this plugin

webpack.config.js

const StructureGraphPlugin = require("structure-graph-webpack-plugin");
{
  ...
  plugins: [
    new StructureGraphPlugin()
  ]
}

Options

You can pass a hash of configuration options to structure-graph-webpack-plugin. Allowed values are as follows:

NameTypeDefaultDescription
targetName{String}structure.txtThe target file name of the generated directory structure map
ignoreDirectorys{Array.<string>}``List of directories ignored in the process of generating files
ignoreFiles{Array.<string>}``List of files ignored in the process of generating files
dress{String}dashedThe generated directory structure style, there are two values, dashed and solid

Here's an example webpack config illustrating how to use these options

webpack.config.js

const StructureGraphPlugin = require("structure-graph-webpack-plugin");
{
  ...
  plugins: [
    new StructureGraphPlugin({
      targetName: 'structure.md',
      ignoreDirectorys: ['.git', 'node_modules'],
      ignoreFiles: ['.DS_Store', 'structure.md']
    })
  ]
}

The generated project structure graph:

+-- dream-wall
¦    +-- .gitignore
¦    +-- README.md
¦    +-- build
¦        +-- webpack.base.conf.js
¦        +-- webpack.dev.conf.js
¦        +-- webpack.prod.conf.js
¦    +-- favicon.ico
¦    +-- index.html
¦    +-- package-lock.json
¦    +-- package.json
¦    +-- src
¦        +-- App.vue
¦        +-- components
¦            +-- footer.vue
¦            +-- header.vue
¦            +-- loading.vue
¦        +-- http
¦            +-- index.js
¦        +-- main.js
¦        +-- pages
¦            +-- download.vue
¦            +-- dream.vue
¦            +-- signin.vue
¦            +-- signup.vue
¦        +-- router
¦            +-- index.js
¦    +-- yarn.lock

Issues

If you encounter some problems during use, please click here Issue Report

License

MIT

Copyright (c) 2022-present flyfox

Keywords

FAQs

Package last updated on 26 Oct 2022

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