Hi guys,
I’m currently working on a yo generator that scaffolds a Roots fresh install, packed with some bonuses.
Themify : GitHub - Chmood/generator-wordpress-themify: A modular Wordpress theme generator, based on Roots
It’s meant to be very modular, and supports both less and sass, along with optional image minification, coffeescript compilation, css autoprefixing and javascript unit tests, plus some example files.
I had the crazy idea to make almost ALL features opt-out-able : you can start with plain css, no boostrap, no modernizr, and even no Roots! It still generates a valid theme.
This generator also offers a true build task in the gruntfile, in order not to bloat the production theme with development source files (less, sass…), nor with node_modules folder (which can be a heavy beast!). It outputs an optimized build of the project in another directory, packing only what’s needed.
Other modifications include :
- using bower package manager and it’s bower_components directory (for jQuery, Boostrap, Modernizr…)
- a bit of revamping on js/css files naming scheme (now using main.js and main.css as compiled files, both in dev/prod themes)
- a bootstrap setup that allows to override the framework AND to update it with bower
- probably other things I can’t remember…
All the rest (especially PHP files) remains the same wonderful Roots we all love.
(Exception made of /lib/scripts.php : modded paths + templated by yo with conditional modernizr support)
Well, this generator is still in early stage, and needs much bug-fixing and beta-testing. But it’s more or less functional, so I thought you folks could be interested in giving it a try!
Any comment, help, feature request or bug report (via github issues) would be highly appreciated.
Grunt/yo/roots ninjas are welcome too, come and see how terrible I am at git!
Is a Roots generator a good idea? How would you improve this one? Which tasks do you often add to your Gruntfile.js when theming with Roots?