Been giving neato a spin, liking it so far! I made some modifications to Gulpfile.js that I think are probably generally applicable in order to ensure the right tasks run at the right times. Basically

  1. The drush command for Drupal 8 was wrong, there's no drush cc anymore
  2. I refactored the tasks out to two different watches, one for css/js and one for twig templates. This way its easier to comment/uncomment exactly the level of cache rebuilding you need depending on how you set up drupal -- waiting for drush cache-rebuild before you see your changes in browser is worth avoiding.
  3. The low-level scss/js/drush processing tasks are now listed as dependencies of the tasks that reload the browser, so that always happens only after the stuff's done.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mbaynton’s picture

Status: Active » Needs review
FileSize
1.99 KB
mbaynton’s picture

FileSize
2.01 KB

Special bonus, this one's actually appliable

kevinquillen’s picture

Assigned: Unassigned » kevinquillen
kevinquillen’s picture

Should we work on making the change to both D8 and D7?

kevinquillen’s picture

This one will have to be rerolled shortly. I have a large change to commit that does:

  • Adds an example.config.js
  • Contains default settings for browserSync and drush
  • If you copy and rename to config.js, Gulp will use those settings

This will allow teams to override config values with environment specific values, like whether or not to trigger drush rebuild, and if they do want to, what command to use. config.js shouldn't be commited back into the theme, allowing folks to work independently on different setups. Perhaps I should also add a .gitignore that ignores config.js by default.

kevinquillen’s picture

I have just committed a merger of these ideas to dev. I tried to find a way to grant multiple author on commit but could not find a way, sorry.

This should allow individuals to set certain overrides to their liking, such as the drush command with the site alias, browser sync settings, and I added a twig useCache variable to eliminate needing to comment or uncomment inside the Gulpfile.

This way if you are on a project with multiple developers, each person can create a config.js and set those up how they'd like. A .gitignore in the STARTER theme will prevent config.js from being commited back in and breaking other members setup.

kevinquillen’s picture

Status: Needs review » Fixed

Seems like theres not been any activity here... and I have been using this workflow on a few projects. It also helps when someone is running a different version of Drush and therefore needs a different alias to be triggered.

TribalMan’s picture

FileSize
747 bytes

Just an update on the README file to reflect this

kevinquillen’s picture

Updated README.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.