Front End Workflows

The workflows listed here should be run from active Drupal themeuuuu.

Building Sass / Javascript for the Browser

First install vendor dependencies with yarn:

yarn install

Note

Run these commands from the root of the theme that is the default active theme in Drupal. Webpack and yarn will figure out the package dependencies from other themes.

Running a one-time compile

Running gulp will compile javascript and css:

gulp

Watching for changes

If you are actively working on a component in the theme you can watch for changes:

gulp watch

Tip

If you receive an error for gulp being missing globally npm i -g gulp will install it. If you run into version mismatches, it may be easier to just run gulp through yarn: yarn gulp watch.

You might need to cache clear

Depending on your local cache settings, and whether you've added new components, you may need to cache clear after recompiling. If this is the first time you've compiled the css / js for the site, or you've just added a new component package, you must clear the Drupal cache.

drush cr