
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
lookbook_storybook_json_generator
Advanced tools
This is a gem that allows you to use lookbook with storybook. It outputs JSON that can be used with storybook.
Install the gem and add to the application's Gemfile by executing:
$ bundle add lookbook_storybook_json_generator
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install lookbook_storybook_json_generator
This gem depends on lookbook. No special settings are required.
Create _preview.stories.json
in the same directory as _preview.rb
written according to the lookbook rules.
This JSON is created when the lookbook loads _preview.rb
.
You may want to refer to dummy_app
in this repository.
First, write the following in Gemfile and complete the lookbook settings.
gem 'lookbook'
gem 'lookbook_storybook_json_generator'
Please refer to the official website for the lookbook. https://lookbook.build/
Create _preview.rb
according to the lookbook description rules.
By default, it is created under the test/components/previews/
directory.
Start Rails.
At this point, the lookbook preview file is read and a JSON file is created in the same directory.
Install Storybook.
Please refer to the official website for Storybook. https://storybook.js.org/
To reference the JSON created with this gem in Storybook, use @storybook/server-webpack5 Add
.
npm install @storybook/server-webpack5
Set up .storybook/main.js
and .storybook/preview.js
.
Again, dummy_app/.storybook/
in this repository may be helpful.
See the repository README for details. https://www.npmjs.com/package/@storybook/server-webpack5
Launch Storybook.
That's it! If all goes well, the preview created in lookbook will also be reflected in Storybook.
If you have any problems, please raise an issue in this repository.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
A small Rails app for development is included in this repository. (located in the dummy_app
directory)
We provide a shortcut command to start this little Rails app.
bin/dummy_rails
... start Railsbin/dummy_storybook
... start StorybookIf you use overmind, we provide a Procfile.
Bug reports and pull requests are welcome on GitHub at https://github.com/forgxisto/lookbook_storybook_json_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the LookbookStorybookJsonGenerator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that lookbook_storybook_json_generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.