Project

lookbook

0.45
The project is in a healthy, maintained state
A native development UI for ViewComponent
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.5
>= 3.26, < 5.0
~> 0.9
>= 5.0
~> 4.3.4
~> 2.5
~> 1.0
 Project Readme

A UI development environment for Ruby on Rails applications.

Documentation  |  Demo site

Gem version CI status


Lookbook combines a powerful component browser and preview system with an integrated documentation engine to help teams build robust, modular, maintainable user interfaces.

It's compatible with ViewComponent, Phlex, ActionView partials and more.

Read the docs →

Lookbook UI

Development

Lookbook is implemented as an isolated Rails Engine and uses ViewComponent, Tailwind and Alpine for its UI.

This repository contains:

  • The Lookbook source code (/app, /lib, /config, etc)
  • The Lookbook documentation site source code and content (/docs).
  • A test suite with a 'runable' dummy app (/spec).

Documentation site

The Lookbook docs site is built using Bridgetown and the source files can be found in the ./docs directory.

To preview changes locally you can run a development version of the docs site:

  1. Clone this repo
  2. Install dependencies: bundle install
  3. Start the app: bin/docs
  4. Visit http://localhost:4000

Testing

Lookbook uses RSpec for testing.

Tests can be run using the rake spec or bundle exec rspec commands.

The dummy app that the tests are being run against can be viewed by running the bin/dummy command and then browsing to http://localhost:9292/lookbook

Releases

Lookbook uses Release It! to automate the release process.

Running npm run release will start the process of publishing a new release and walks though all the steps from picking a version number to publishing the updated gem.

Publishing a release requires write permissions for this repository (lookbook-hq/lookbook) and 2FA publish permissions for Lookbook on RubyGems.

Contributing

Lookbook is an un-funded open source project and contributions of all types and sizes are most welcome!

Please take the time to read over the Contributing guide before making your first contribution and if anything isn't clear then start a discussion and we will do our best to help you out.

Contributors

Lookbook was created by Mark Perkins and continues to grow & improve thanks to the ideas, suggestions and hard work of all of these excellent humans:

License

The gem is available as open source under the terms of the MIT License.