lin3s / pattern-library-builder
Library that provides an elegant and easy way to develop a pattern library for your front-end components
Installs: 3 054
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 9
Requires
- php: ^7.1
- symfony/framework-bundle: ^2.8 || ^3.0
- symfony/templating: ^2.8 || ^3.0
Requires (Dev)
- lin3s/php-cs-fixer-config: ^1.0
- phpspec/phpspec: ^3.3
- symfony/asset: ^3.3
- symfony/console: ^3.3
- symfony/debug-bundle: ^3.3
- symfony/twig-bundle: ^3.3
- symfony/var-dumper: ^3.3
- symfony/web-server-bundle: ^3.3
- symfony/yaml: ^3.3
This package is not auto-updated.
Last update: 2024-12-20 14:27:48 UTC
README
Library that provides an elegant and easy way to develop a pattern library for your front-end components
Features
- YAML config driven pattern library builder
- Opinated and extensible default template
- Use already existing renderers to list colors, typography, iconography
- Render twig templates in responsive viewports and with autogenerated twig "include" method and HTML output
- Easily create your renderer to adapt it to your needs
- Standalone PHP library with built-in Symfony integration
Installation
The easiest way to install this bundle is using Composer
$ composer require lin3s/pattern-library-builder
Documentation
- First use
- Renderers
- Theme
- Symfony integration
All the documentation is stored in the
docs
folder.
Tests
This library is tested by PHPSpec, SpecBDD framework for PHP.
Run the following command to launch tests:
$ vendor/bin/phpspec run -fpretty
Also, you can easily start a simple application to test the features that the bundle provides.
$ cd tests/Application && bin/console server:start --docroot=web $ open http://127.0.0.1:8000/design-system
Contributing
This library follows PHP coding standards, so pull requests need to execute the Fabien Potencier's PHP-CS-Fixer. Furthermore, if the PR creates some not-PHP file remember that you have to put the license header manually. In order to simplify we provide a Composer script that wraps all the commands related with this process.
$ composer run-script cs
There is also a policy for contributing to this bundle. Pull requests must be explained step by step to make the review process easy in order to accept and merge them. New methods or code improvements must come paired with PHPSpec tests.