EvanLovely/theme-tools

Review current work

EvanLovely opened this issue · 6 comments

I'd love if anyone (esp @sghoweri or @evanmwillhite ) would review the work done in this repo.

In packages/:

  • theme-core-plugin--browser-sync - Browser Sync plugin
  • theme-core-plugin--sass - Sass plugin
  • theme-core-plugin--pattern-lab--php - Pattern Lab plugin
  • theme-core - Utilities that the others use
  • generator-theme - The yeoman generator that lets us run yo theme to create a Drupal theme with Pattern Lab and the above plugins. Still needs a bit of work, but is very close. I think we just have do a little manual config setup for each plugin. You can see instructions on setting up config in each plugin folder's readme.

In examples/:

  • common/ A simple Pattern Lab site with these Gulp plugins.

Super quick start after cloning:

npm install
npm run bootstrap
cd examples/common
npm start

These are already all published to npm, but with a sub-1.0.0 version number. I'd like to get things ironed out and tight enough to get out 1.0.0 for all of these. After I see it solid, I'll start to integrate some of this work into p2-theme-core.

@EvanLovely one small small thing to add to your quick start instructions:

After running npm install + bootstrapping Lerna, we need to also install Pattern Lab's composer dependencies (otherwise you get a lovely little Cannot GET /pattern-lab/public error)

npm install
npm run bootstrap
cd examples/common/pattern-lab
composer install --no-interaction
cd ../
npm start

Also, side question: is it worth mentioning anything about Composer / GitHub's API limit + creating an OAuth token on Github, or is the default message that pops up sufficient if/when that pops up and you don't already have those creds stored in Composer?

Suggestions from my end are up via #3

Forgive my ignorance here, but just want to make sure with this structure - would a user be able to install these items piecemeal (e.g., if they want their own sass plugin, no yo theme, etc.)

Yep!! That's the beauty! Each folder in packages/ is its own npm module, they just share a repo. You could install just the Sass compiling or just the Pattern Lab compiling if you'd like. I also want to make a PostCSS plugin so people could choose between Sass and it. Installing one only brings in the dependencies listed in that folder's package.json and not others. These tasks could be used as a smaller part of a bigger Gulp setup like in emulsify-gulp or p2-theme-core as well.

I see the yeoman generator as the starting spot for those that just want to get started. However it's setup in a way that it's not a total black box and you can implement the pieces you need.

Perfect, thanks for the explanation!