lin3s/pattern-library-builder

Library that provides an elegant and easy way to develop a pattern library for your front-end components

v0.2.1 2018-07-12 12:22 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

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.

Licensing Options

License