Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Updating feathers packages
Browse files Browse the repository at this point in the history
Removed socket stuff because we're not using it
  • Loading branch information
saiichihashimoto committed Jun 9, 2016
1 parent f8d4018 commit 3f002d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
13 changes: 4 additions & 9 deletions application/browser.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
var feathers = require('feathers-client');
var rest = require('feathers-rest/client');

var app = feathers(document.location.origin);
if (process.env.npm_package_feathersjs_socket) {
/* global io */
app.configure(feathers.socketio(io()));
/* global io:false */
} else {
global.fetch = null;
require('whatwg-fetch');
app.configure(feathers.fetch(global.fetch));
}
global.fetch = null;
require('whatwg-fetch');
app.configure(rest().fetch(global.fetch));

module.exports = app;
6 changes: 2 additions & 4 deletions application/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var helmet = require('helmet');
var match = require('react-router').match;
var path = require('path');
var promisify = require('es6-promisify');
var rest = require('feathers-rest');
var serverRender = require('feathers-react-redux/serverRender');
var sm = require('sitemap');
var Provider = require('react-redux').Provider;
Expand All @@ -28,10 +29,7 @@ app.use(bodyParser.urlencoded({ extended: true }));

app.use(feathers.static(path.join(__dirname, '../assets'), { maxage: '365d' }));
app.use(feathers.static(path.join(__dirname, '../dist'), { maxage: '365d' }));
app.configure(feathers.rest());
if (process.env.npm_package_feathersjs_socket) {
app.configure(feathers.socketio());
}
app.configure(rest());

app.set('view engine', 'jsx');
app.set('views', path.join(__dirname, '../components'));
Expand Down
1 change: 0 additions & 1 deletion components/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ var HTMLDoc = React.createClass({
<body>
<div id="react-app" dangerouslySetInnerHTML={{ __html: this.props.markup }} />
<script id="react-state" type="text/json" dangerouslySetInnerHTML={{ __html: JSON.stringify(this.props.state) }} />
{process.env.npm_package_feathersjs_socket && <script type="text/javascript" src="/socket.io/socket.io.js" />}
<script type="text/javascript" src={'/' + HTMLDoc.cacheBuster('js/main.js')} async />
{this.props.head.script.toComponent()}
</body>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@
"exorcist": "^0.4.0",
"express-react-views": "^0.9.0",
"fast-levenshtein": "^1.1.3",
"feathers": "^1.3.0",
"feathers-client": "^0.5.3",
"feathers": "^2.0.1",
"feathers-client": "^1.3.2",
"feathers-react-redux": "^0.4.1",
"feathers-rest": "^1.4.2",
"filesaverjs": "^0.2.1",
"googleapis": "^2.1.7",
"helmet": "^1.1.0",
Expand Down Expand Up @@ -118,7 +119,6 @@
"rollbar": "^0.5.16",
"rollbar-browser": "^1.9.1",
"sitemap": "^1.6.0",
"socket.io": "^1.4.6",
"sorcery": "^0.9.2",
"svg2png": "^3.0.0",
"uglify-js": "^2.6.1",
Expand Down

0 comments on commit 3f002d8

Please sign in to comment.