https://github.com/mel-miller/generator-sb-drupal
https://github.com/mel-miller/generator-sb-drupal
drupal storyboook twig yeoman-generator
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mel-miller/generator-sb-drupal
- Owner: mel-miller
- License: gpl-3.0
- Created: 2022-09-09T02:07:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T18:05:27.000Z (over 2 years ago)
- Last Synced: 2025-01-17T19:55:01.277Z (4 months ago)
- Topics: drupal, storyboook, twig, yeoman-generator
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/generator-sb-drupal
- Size: 191 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# generator-sb-drupal
This package provides a Yeoman generator for Twig-based Storybook components to be used within projects based on the [mel-miller/sb-drupal](https://github.com/mel-miller/sb-drupal) approach to creating a Drupal/Twig Storybook instance.
## Install
Install [Yeoman](https://yeoman.io/) globally.
```
npm install -g yo
```Install this generator as a dev dependency to your project.
```
npm install -D generator-sb-drupal
```## Usage
This generator should be run from the root of your project.
```
yo sb-drupal:component
```Follow the prompts and a new directory will be created within the proper category directory in `src`. The new directory will contain the following starter files:
- `{component-name}.stories.js`
- `{component-name}.twig`
- `_{component-name}.scss`
- `{component-name}.docs.mdx`
- `{component-name}.behaviors.js` (if selected)