Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pilotkid/vue-styleguidist-auto-sections
Automatically converts directories to sections for your vue-styleguide
https://github.com/pilotkid/vue-styleguidist-auto-sections
Last synced: about 1 month ago
JSON representation
Automatically converts directories to sections for your vue-styleguide
- Host: GitHub
- URL: https://github.com/pilotkid/vue-styleguidist-auto-sections
- Owner: pilotkid
- Created: 2020-05-05T17:04:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T20:48:05.000Z (over 4 years ago)
- Last Synced: 2024-11-10T08:39:54.501Z (about 2 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Node.js Package](https://github.com/pilotkid/vue-styleguidist-auto-sections/workflows/Node.js%20Package/badge.svg)
# 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,
})
}
```