Skip to content

Commit

Permalink
Update to node 8
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Jun 5, 2017
1 parent 19cbde3 commit 6f699a7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
dockerfile: web/Dockerfile
command: npm run server-dev
environment:
- ENV=development
- NODE_ENV=development
ports: ['8000:8000']
volumes:
- './web/app:/home/web/app'
Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:6.9.4
FROM node:8.0.0
WORKDIR /home/web

ADD web/package.json /home/web/package.json
Expand Down
2 changes: 1 addition & 1 deletion web/app/countrytopos.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var d3 = require('d3');
var topojson = require('topojson');

var topos = require('json-loader!./world.json');
var topos = require('./world.json');

var exports = module.exports = {};

Expand Down
6 changes: 3 additions & 3 deletions web/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ var ExchangeLayer = require('./exchangelayer');
var flags = require('./flags');
var grib = require('./grib');
var HorizontalColorbar = require('./horizontalcolorbar');
var lang = require('json-loader!./configs/lang.json')[locale];
var lang = require('./configs/lang.json')[locale];
var LoadingService = require('./loadingservice');
var Solar = require('./solar');
var Tooltip = require('./tooltip');
var Wind = require('./wind');

// Configs
var capacities = require('json-loader!../../config/capacities.json');
var zones = require('json-loader!../../config/zones.json');
var capacities = require('../../config/capacities.json');
var zones = require('../../config/zones.json');

// Constants
var REFRESH_TIME_MINUTES = 5;
Expand Down
20 changes: 9 additions & 11 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
"version": "0.0.1",
"description": "",
"dependencies": {
"async": "^2.0.1",
"compression": "^1.6.2",
"currency-symbol-map": "^3.1.0",
"d3": "^4.4.0",
"ejs": "^2.5.5",
"express": "^4.10.2",
"d3": "^4.9.1",
"ejs": "^2.5.6",
"express": "^4.15.3",
"i18n": "^0.8.3",
"js-cookie": "^2.1.3",
"json-loader": "git://github.com/webpack/json-loader.git#780f438d6e47155496d0b8ac7a9a3b35edc65e9a",
"moment": "^2.15.2",
"opbeat": "^4.11.0",
"topojson": "^2.2.0"
"js-cookie": "^2.1.4",
"moment": "^2.18.1",
"opbeat": "^4.14.0",
"topojson": "^3.0.0"
},
"devDependencies": {
"nodemon": "^1.10.2",
"webpack": "^1.13.3"
"nodemon": "^1.11.0",
"webpack": "^2.6.1"
},
"repository": {
"type": "git",
Expand Down
3 changes: 1 addition & 2 deletions web/server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var isProduction = process.env.ENV === 'production';
var isProduction = process.env.NODE_ENV === 'production';

// * Opbeat (must be the first thing started)
if (isProduction) {
Expand All @@ -11,7 +11,6 @@ if (isProduction) {
}

// Modules
var async = require('async');
var compression = require('compression');
var d3 = require('d3');
var express = require('express');
Expand Down
6 changes: 1 addition & 5 deletions web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ module.exports = {
callback();
});
},
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
Expand All @@ -41,8 +40,5 @@ module.exports = {
output: {
filename: 'bundle.' + (process.env.BUILD === 'debug' ? 'dev' : '[hash]') + '.js',
path: __dirname + '/public/dist/'
},
resolve: {
moduleDirectories: ['node_modules']
}
};

0 comments on commit 6f699a7

Please sign in to comment.