# OmniUpdate Framework

Omni Framework is starting point for all iFactory OU projects.

## Node/Gulp Setup

[Node.js](https://nodejs.org) is required for development of this theme.

OU Framework uses [Gulp.js](https://gulpjs.com/) to automate the build
workflow.

### Configuration

1. Install Gulp and all required modules:
`npm install gulp`

2. Copy `default.gulpconf.js` to `gulpconf.js` and update for your local
environment and preferred settings. All custom Gulp configuration should
live inside of this file.

### Browsersync

For Browsersync to work within Drupal you will need to install the
[module](https://www.drupal.org/project/browsersync) and enable it locally
since it is ignored via Git.

### Default tasks

By default Gulp comes configured with the following tasks:

#### images

- Minimize and optimize theme images
- You must have libpng installed for `imagemin-mozjpeg` to work

#### css

- Pre-process CSS for development

#### js

- Pre-process JS for development

#### watch

- Run build tasks for development including BrowserSync

#### default

- Runs watch task

## Backstop.js

[Backstop.js](https://github.com/garris/BackstopJS) has been included in the
framework for visual regression testing and QA.

### Config

The basic configuration is included in `.backstoprc.js` and should not need to
be modified.

### Scenarios and Paths

All scenarios and paths to test should be added to `bs-paths.js`. This
configuration file will reference your local environment that is set in
`.gulpconf.js`.

### Makefile

This will eventually move to Gulp but for the time being a Makefile has been
implemented to allow easy generation of backstop references and running
tests.

#### Reference

Run the following from your webroot `make bs-reference`

#### Test

Run the following from your webroot `make bs-test`

#### Approve

Run the following from your webroot `make bs-approve`
