2.0.0 • Published 4 years ago

vue-styleguidist-auto-sections v2.0.0

Weekly downloads
11
License
ISC
Repository
github
Last release
4 years ago

Node.js Package

Installation

  1. From the terminal run: npm install vue-styleguidist-auto-sections --save-dev
  2. In your project (must have vue-style-guidist installed) open your styleguide.config.js
  3. Add a requirement let DirSections = require('vue-styleguidist-auto-sections');
  4. In the module.exports for vue-styleguidist add sections: DirSections.getSections()

Example styleguide.config.js

let DirSections = require('vue-styleguidist-auto-sections');

module.exports = {
    sections: DirSections.getSections(),
}

Options

BasePath

  • Description
    • The root directory you wish to search for components and folders
  • Type
    • string
  • Default
    • './src/components/'

BaseSectionTitle

  • Description
    • The name for the section that correlates to the BasePath
  • Type
    • string
  • Default
    • 'Miscellaneous'

ComponentsRegex

  • Description
    • The regular expression to be used to locate your components
  • Type
    • string
  • Default
    • '[A-Z]*.vue'

Verbose

  • Description
    • Will it output verbose information as it scans directories
  • Type
    • boolean
  • Default
    • false

Example

let DirSections = require('vue-styleguidist-auto-sections');

module.exports = {
    sections: DirSections.getSections({
        BasePath: './src/components/documentthese',
        BaseSectionTitle: "Extra bits",
        ComponentsRegex: "*.vue",
        Verbose: true,
    })
}