Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
- The drush command for Drupal 8 was wrong, there's no drush cc anymore
- 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.
- 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.
Comment | File | Size | Author |
---|---|---|---|
#8 | README.patch | 747 bytes | TribalMan |
#2 | 2536060-2.patch | 2.01 KB | mbaynton |
#1 | 2536060-gulpfile-1.patch | 1.99 KB | mbaynton |
Comments
Comment #1
mbayntonComment #2
mbayntonSpecial bonus, this one's actually appliable
Comment #3
kevinquillen CreditAttribution: kevinquillen commentedComment #4
kevinquillen CreditAttribution: kevinquillen commentedShould we work on making the change to both D8 and D7?
Comment #5
kevinquillen CreditAttribution: kevinquillen commentedThis one will have to be rerolled shortly. I have a large change to commit that does:
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.
Comment #6
kevinquillen CreditAttribution: kevinquillen commentedI 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.
Comment #7
kevinquillen CreditAttribution: kevinquillen commentedSeems 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.
Comment #8
TribalMan CreditAttribution: TribalMan commentedJust an update on the README file to reflect this
Comment #11
kevinquillen CreditAttribution: kevinquillen at Velir commentedUpdated README.