Skip to content

Commit

Permalink
fixes the ORDS 3.0.3+ issue
Browse files Browse the repository at this point in the history
fixes #94
  • Loading branch information
vincentmorneau committed Oct 15, 2016
1 parent f2b93d9 commit c1498df
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 39 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ Thanks to [Insum Solutions](http://insum.ca/) for sponsoring this project.
- [Oracle APEX](https://apex.oracle.com) 4-5 (or more) for [Application Setup Option 2](/docs/apex-setup.md)
- [Git](https://git-scm.com/downloads)

*Having `Cross Origin Sharing Requests` issues? [See CORS documentation](/docs/cors.md).*

## Install
- Open the command line
- Go to your desired APEX Front-End Boost directory
- Go to your desired installation directory
- Execute
```bash
git clone https://github.com/OraOpenSource/apex-frontend-boost.git
Expand All @@ -72,7 +70,6 @@ npm install
```

*Having problems installing on Windows? [See documentation](/docs/windows.md).*

*Having problems installing on Linux? [See documentation](/docs/linux.md).*

## Update
Expand Down
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
## 2.1.3
- Added a config option `config.browsersync.ghostMode` to enable/disable the mirroring of clicks, scrolls and typing across devices.
- **APEX Front-End Boost is now usable on ORDS 3.0.3 and up.**
- Adds an option `config.browsersync.ghostMode` to enable/disable the mirroring of clicks, scrolls and typing across devices.
- Reloads the browser for any changes made inside `img` and `lib` folders.
- Notifies you when APEX Front-End Boost has a new version

## 2.1.2
- Removed `npm` as an install option for simplicity.
Expand Down
4 changes: 2 additions & 2 deletions docs/apex-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
APEX Front-End Boost requires some slight modifications to your APEX application. These changes are required in order to have your APEX application communicate with APEX Front-End Boost.

There are two options to setup your application:
- **Option 1) Standard**
- **[Option 1) Standard](#option-1-standard)**
- 1 Build Option
- 1 Application Process
- **Option 2) Custom Application Item**
- **[Option 2) Custom Application Item](#option-2-custom-application-item)**
- 1 Build Option
- 1 Application Item
- 2 Application Processes
Expand Down
20 changes: 0 additions & 20 deletions docs/cors.md

This file was deleted.

17 changes: 10 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ try {
validate = require('jsonschema').validate,
schema = require('./lib/defaultSchema'),
fs = require("fs"),
mkdirp = require('mkdirp');

const chalk = require('chalk');
const updateNotifier = require('update-notifier');
mkdirp = require('mkdirp'),
chalk = require('chalk'),
updateNotifier = require('update-notifier');
} catch (e) {
console.error('Your installation is missing dependencies. Please execute "npm install" again.');
process.exit();
Expand Down Expand Up @@ -83,14 +82,14 @@ if (config.header.enabled) {
var pkg = require(config.header.packageJsonPath);
var banner = ['/*!',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @author v<%= pkg.author %>',
' * @author <%= pkg.author %>',
' * @version v<%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n');
} catch (e) {
console.log(chalk.red.bold("Your 'config.header.packageJsonPath' is invalid. It should point to your package.json file."));
console.log(chalk.red.bold("Your 'config.header.packageJsonPath' is invalid. It should point to your project package.json file."));
process.exit();
}
}
Expand Down Expand Up @@ -141,6 +140,9 @@ var paths = {
apexMiddleware = function (req, res, next) {
res.setHeader('Set-Cookie', ['oos-apex-frontend-boost-app-images=//' + req.headers.host + '/']);
next();
},
apexProxyReq = function(req, res, next) {
req.setHeader('Origin', req.agent.protocol + '//' + req._headers.host);
};

// build directory structure
Expand Down Expand Up @@ -286,7 +288,8 @@ gulp.task('browsersync', function() {
notify: config.browsersync.notify,
proxy: {
target: config.appURL,
middleware: apexMiddleware
middleware: apexMiddleware,
proxyReq: [apexProxyReq]
},
serveStatic: [config.distFolder],
ui: {
Expand Down
4 changes: 3 additions & 1 deletion lib/scssToLess.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ module.exports = function() {
.replace(/ !default/g, '')
.replace(/',/g, ',')
.replace(/'\./g, '.')
.replace(/#{([^}]+)}/g, "~\"$1\"")
.replace(/\'/g, '"')
// .replace(/#{([^}]+)}/g, "~\"$1\"")
.replace(/#{([^}]+)}/g, "$1")
.replace(/~\"@(\w+)\"/g, "@{$1}")
.replace(/adjust-hue\(/g, 'spin(')
.replace(/^.*@import.*$/mg, "")
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"postinstall": "node generateConfig.js"
},
"dependencies": {
"browser-sync": "2.14.x",
"browser-sync": "2.17.x",
"chalk": "1.1.x",
"del": "2.2.x",
"gulp": "3.9.x",
Expand All @@ -41,12 +41,12 @@
"gulp-imagemin": "3.0.x",
"gulp-jshint": "2.0.x",
"gulp-less": "3.1.x",
"gulp-load-plugins": "1.2.x",
"gulp-load-plugins": "1.3.x",
"gulp-plumber": "1.1.x",
"gulp-rename": "1.2.x",
"gulp-sass": "2.3.x",
"gulp-size": "2.1.x",
"gulp-sourcemaps": "2.0.0-alpha",
"gulp-sourcemaps": "2.1.1",
"gulp-uglify": "2.0.x",
"gulp-util": "3.0.x",
"jshint": "2.x",
Expand All @@ -59,6 +59,6 @@
"run-sequence": "1.2.x",
"through2": "2.0.x",
"update-notifier": "1.0.x",
"yargs": "5.0.x"
"yargs": "6.0.x"
}
}

0 comments on commit c1498df

Please sign in to comment.