Skip to content

Instantly share code, notes, and snippets.

@drawcard
Last active August 29, 2015 14:14
Show Gist options
  • Save drawcard/07f3d2389c67acf46e13 to your computer and use it in GitHub Desktop.
Save drawcard/07f3d2389c67acf46e13 to your computer and use it in GitHub Desktop.
Roots / Sage 8.0 Setup Process

Legend

Local Server = local.dev

Staging Server = staging.xxxxxx.com

Production Server = xxxxxx.com

1. Fetch the Roots template files

# STAGING SERVER
git clone --bare https://github.com/roots/roots.git /var/git/path/to/bare-repo/drawcard.com.au.build.theme.git

2. Set up local server

# LOCAL SERVER
git clone git@project.com.au/var/git/path/to/bare-repo/drawcard.com.au.build-sage.theme.git/ /path/to/themes/project.com.au.build

# Add roots project to 'upstream branch'
git remote add upstream https://github.com/roots/roots 

# Optional: pull from 8.0.0 beta branch
git fetch && git checkout 8.0.0

# Make a new branch to begin theme development
git checkout -b development

3. Initialise Roots

Steps to repeat on staging / local servers after cloning Sage:

You may also need to install these packages in your theme directory:

npm install --save-dev node-sass gulp-load-plugins yargs browser-sync gulp lazypipe merge-stream asset-builder gulp-plumber gulp-concat gulp-pleeease gulp-sourcemaps gulp-if gulp-less gulp-sass del gulp-rev lodash.isarguments lodash.isarray

If you are having gulp-sass issues you may need to run:

npm rebuild node-sass

4. Get ready for development

  • Switch over from LESS to SASS:
  • Remove original bootstrap from bower.json: bower uninstall bootstrap
  • Install SASS bootstrap: bower install bootstrap-sass-official --save```` *mv assets/styles/main.less main.less.old```
  • nano assets/manifest.json: Update the assets/manifest.json styles dependencies to change main.less to main.scss
  • cp assets/styles/editor-style.less assets/styles/editor-style.scss && nano assets/styles/editor-style.scss: Update editor-style.less to remove/comment out the main.less import at the top since that file no longer exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment