Skip to content

Instantly share code, notes, and snippets.

@bacoords
Created February 26, 2021 05:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bacoords/7bbc73cdab7add45da449be46e619f25 to your computer and use it in GitHub Desktop.
Save bacoords/7bbc73cdab7add45da449be46e619f25 to your computer and use it in GitHub Desktop.

Underscores Tutorial

howarddc.com | 2.25.2021

Tutorial

Dev Prereqs

The first step is to confirm that your machine is ready for development using Node, NPM, and Gulp.

  • NVM: Node Version Manager can be confirmed by running command -v nvm.
  • Gulp CLI should be installed globally via npm install --global gulp-cli. You can confirm it by running gulp --version.

Once your computer is set, it's time to begin setting up this project.

Setting Up the Local Environment

You'll want to get a local site up and running for the quickest and safest development.

Once you've successfully made it through npm install (and sometimes it ends with an error on the gulp copy-assets command, but that's ok), you can start developing your new theme.

Developing

Whenever you're actively developing the theme, let gulp watch handle things like generating and autoprefixing CSS and minifying Javascript.

  • Running gulp watch while developing to have CSS and JS processed for you.
  • Setting up Bootstrap variables in /sass/theme/_child_theme_variables.scss to pull in the correct fonts, sizes, brand colors, and settings for other potential UI elements you plan to use from Bootstrap.
  • Adding custom CSS/SASS files in /sass/theme
  • Adding custom JS in /src/js/custom-javascript.js

Deploying To Staging

  • Incrementing your theme's version number to trigger cache clearing.
  • How to commit/deploy changes back to WPEngine and/or Bitbucket

Additional Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment