A generator for Yeoman scaffolding a Drupal theme


A generator for Yeoman. (!Important! This is work in progress right now, so keep calm and describe your issues in the queue on github)

  • Make sure you have yo installed: npm install -g yo
  • Install the generator: npm install -g generator-drupaltheme
  • Run: yo drupaltheme
  • info file
  • placeholder images for logo and screenshot
  • bower, editor and jshint config
  • choice of CSS, SCSS or COMPASS scaffolding
  • HTML5 templates and preprocessing

There is currently an experimental drush integration through a drush plugin. See the sandbox project on drush themegenerator

It currently provides a

  • drush command (drush gt) to
    • pass Drupal environment variables to yeoman
    • pick up yo generator configuration from (base)themes
    • pick up yo generator configuration from ~/.drush_themegenerator/starterkits folder

A sample yo generator configuration can be found here: gt_blueprints

    $ mkdir ~/.drush_themegenerator/
    $ cd ~/.drush_themegenerator/
    $ git clone starterkits
  • directory structure documentation
  • Grunt integration
    • linting
    • compiling
    • uglyfying
    • optimization
    • live reloading
  • Drupal logo in generator ;)
  • more preprocessing with (sane) defaults
  • better template.php structure with includes
  • sub generator for panels/panelizer
  • a choice for Drupal 8 flavor

GPL License