[SensioLabs/Storybook-Bundle] create 0.1 recipe (#1623)

* [SensioLabs/Storybook-Bundle] create 0.1 recipe

* fix newline file requirements

* fix yaml standards

* fix yaml standards for bundle config

* recipe only for Symfony 7 and up

* add gitignore setup

* update conflict statement
This commit is contained in:
Jordan Wamser
2024-07-05 08:13:16 +02:00
committed by GitHub
parent 86fa9c9c34
commit 35f85aeec1
6 changed files with 56 additions and 0 deletions
@@ -0,0 +1,5 @@
when@dev:
storybook:
sandbox:
allowedFunctions:
- 'dump'
@@ -0,0 +1,2 @@
storybook:
resource: '@StorybookBundle/config/routes.php'
@@ -0,0 +1,16 @@
{
"bundles": {
"Storybook\\StorybookBundle": ["all"]
},
"gitignore": [
"/node_modules"
],
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"stories/": "stories/",
"templates/": "templates/"
},
"conflict": {
"symfony/framework-bundle": "<6.4"
}
}
@@ -0,0 +1,8 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>
* <fg=blue>Run</> your application:
1. Initialize Storybook in your project: <comment>bin/console storybook:init</> command;
- This will create basic configuration files and add required dependencies to your package.json.
2. Follow the instructions provided by the storybook:init command
@@ -0,0 +1,24 @@
import {twig} from "@sensiolabs/storybook-symfony-webpack5";
export default {
component: twig`
<div>Hello {{ name }}!</div>
`,
args: {
name: 'World'
}
}
export const Default = {};
export const John = {
args: {
name: 'John'
}
};
export const Jane = {
args: {
name: 'Jane'
}
};
@@ -0,0 +1 @@
{% extends '@!Storybook/preview.html.twig' %}