From 61ca3d7ab316428b40bdd040bb4738b4fddc2791 Mon Sep 17 00:00:00 2001
From: Vincent Morneau <vincent.morneau@gmail.com>
Date: Tue, 2 Aug 2016 09:55:03 -0400
Subject: [PATCH] adds ghostMode option

fixes #115
---
 .travis.yml                   |   3 ++-
 README.md                     |   4 ++--
 changelog.md                  |   5 ++++-
 default.json                  |   3 ++-
 docs/config.json.md           |   4 +++-
 {media => docs}/demo-main.gif | Bin
 docs/examples.md              |   2 +-
 gulpfile.js                   |   5 ++---
 package.json                  |   8 ++++----
 9 files changed, 20 insertions(+), 14 deletions(-)
 rename {media => docs}/demo-main.gif (100%)

diff --git a/.travis.yml b/.travis.yml
index 45d4f39..3f308e8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
 language: node_js
 node_js:
-  - "4.3"
+  - "4"
   - "5"
+  - "6"
diff --git a/README.md b/README.md
index 4628860..9bcb2bb 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ APEX Front-End Boost is a personal local web server that hosts and distributes y
 
 APEX Front-End Boost makes coding faster, easier, and prettier. This productivity tool helps you work with static files (`js`, `css`, `images`, etc.) more efficiently within an APEX application.
 
-![demo](/media/demo-main.gif)
+![demo](/docs/demo-main.gif)
 
 #### What APEX Front-End Boost does
 - Minifies `js` and `css`.
@@ -75,7 +75,7 @@ npm install
 
 *Having problems installing on Linux? [See documentation](/docs/linux.md).*
 
-## Upgrade
+## Update
 - Open the command line
 - Go to your APEX Front-End Boost directory
 - Execute
diff --git a/changelog.md b/changelog.md
index 8f8b2d0..a9870e9 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
 # Changelog
-## 2.1.1
+## 2.1.3
+- Added a config option `config.browsersync.ghostMode` to enable/disable the mirroring of clicks, scrolls and typing across devices.
+
+## 2.1.2
 - Removed `npm` as an install option for simplicity.
 
 ## 2.1.1
diff --git a/default.json b/default.json
index 1849667..a34600f 100644
--- a/default.json
+++ b/default.json
@@ -23,7 +23,8 @@
         "port": 3000,
         "uiPort": 3001,
         "weinrePort": 8080,
-        "notify": true
+        "notify": true,
+        "ghostMode": true
     },
     "themeroller":{
         "enabled": false,
diff --git a/docs/config.json.md b/docs/config.json.md
index 50a668e..b3a3f31 100644
--- a/docs/config.json.md
+++ b/docs/config.json.md
@@ -56,7 +56,8 @@ It is only mandatory to fill out the `appURL` in `config.json`. The rest is opti
         "port": 3000,
         "uiPort": 3001,
         "weinrePort": 8080,
-        "notify": true
+        "notify": true,
+        "ghostMode": true
     },
     "themeroller":{
         "enabled": false,
@@ -146,6 +147,7 @@ Name | Type | Default | Description
 `browsersync.uiPort` | int | `3001` | Browsersync includes a user-interface that is accessed via a separate port.
 `browsersync.weinrePort` | int | `8080` | This is the weinre port that browsersync uses.
 `browsersync.notify` | boolean | `true` | This option makes browsersync alert you when a file is dynamically injected to you browser.
+`browsersync.ghostMode` | boolean | `true` | This option makes clicking, scrolling and typing being replicated on all devices.
 
 > Useful for Javascript & CSS development, as you won't have to manually refresh your browser.
 
diff --git a/media/demo-main.gif b/docs/demo-main.gif
similarity index 100%
rename from media/demo-main.gif
rename to docs/demo-main.gif
diff --git a/docs/examples.md b/docs/examples.md
index 9a186b0..4136c39 100644
--- a/docs/examples.md
+++ b/docs/examples.md
@@ -1,7 +1,7 @@
 # Features Examples
 
 ## Browsersync
-![demo](../media/demo-main.gif)
+![demo](demo-main.gif)
 
 ## Sass
 You write:
diff --git a/gulpfile.js b/gulpfile.js
index 7576b6e..b20e7bf 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,5 +1,3 @@
-// APEX Gulp Stack
-
 // 1. LIBRARIES
 var gulp = require('gulp'),
     plugins = require('gulp-load-plugins')(),
@@ -270,7 +268,8 @@ gulp.task('browsersync', function() {
             weinre: {
                 port: config.browsersync.weinrePort
             }
-        }
+        },
+        ghostMode: config.browsersync.ghostMode
     });
 });
 
diff --git a/package.json b/package.json
index 10fd957..5fd2eea 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
     "name": "apex-frontend-boost",
     "author": "OraOpenSource",
-    "version": "2.1.2",
+    "version": "2.1.3",
     "description": "Enhance your productivity with a complete Front-End Stack for Oracle APEX development",
     "license": "MIT",
     "keywords": [
@@ -27,7 +27,7 @@
         "postinstall": "node generateConfig.js"
     },
     "dependencies": {
-        "browser-sync": "2.13.x",
+        "browser-sync": "2.14.x",
         "chalk": "1.1.x",
         "del": "2.2.x",
         "gulp": "3.9.x",
@@ -47,7 +47,7 @@
         "gulp-sass": "2.3.x",
         "gulp-size": "2.1.x",
         "gulp-sourcemaps": "2.0.0-alpha",
-        "gulp-uglify": "1.5.x",
+        "gulp-uglify": "2.0.x",
         "gulp-util": "3.0.x",
         "jshint": "2.x",
         "jshint-stylish": "2.2.x",
@@ -58,6 +58,6 @@
         "rtlcss": "2.0.x",
         "run-sequence": "1.2.x",
         "through2": "2.0.x",
-        "yargs": "4.7.x"
+        "yargs": "4.8.x"
     }
 }