Componentize!
Integrate/import your well-structured component style guide into Drupal.
Prefer to organize your styles into components? Want to use Handlebars as templates? Want to use an automated, living style guide (KSS) that's synced to Drupal? Now you can!
Keep a clean front-end structure and make Drupal aware with convenient developer APIs; render CMS content through Handlebars templates! Map entities directly into components without writing a line of code using fields and fieldgroups.
Get Started
Basic Install
- Install Composer to manage dependencies.
- Ensure you have Composer Manager. Some helpful notes.
- Tell composer where to manage vendor code with the these two variables. Add to your site's settings.php file or use
drush vset
.
$conf['composer_manager_vendor_dir'] = 'vendor';
$conf['composer_manager_file_dir'] = './';
- Build your site root composer config:
drush composer-json-rebuild
- Get library dependencies via
composer install --prefer-dist
- KSS-PHP, KSS component parser for PHP
- Lightncandy, Handlebars rendering
- Get Drupal dependencies (for sub-modules).
- Create a
/sites/all/components
folder, and drop in a few components, see examples. - Install Drupal module (and any sub-modules) via Drush or admin UI.
- Visit the admin page (
admin/structure/componentize
), alter include paths if desired and choose cache aggresiveness for tracking component data. Save settings once to generate components from your style guide components if you are using caching.