Skip to content

Commit 6b9ccf7

Browse files
authored
Merge pull request #6 from sjotterman/update-dependencies
Update dependencies
2 parents ddf97da + f58613b commit 6b9ccf7

File tree

5 files changed

+83
-55
lines changed

5 files changed

+83
-55
lines changed

.babelrc

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
{
2-
"presets" : [
3-
"latest"
4-
]
5-
}
2+
"presets": [
3+
"env"
4+
],
5+
"env": {
6+
"production": {
7+
"presets": [
8+
["env", {
9+
"es2015": {
10+
"modules": false
11+
}
12+
}]
13+
]
14+
}
15+
}
16+
}

package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,42 @@
2525
"author": "Cory House",
2626
"license": "MIT",
2727
"dependencies": {
28-
"whatwg-fetch": "1.0.0"
28+
"whatwg-fetch": "2.0.3"
2929
},
3030
"devDependencies": {
31-
"babel-cli": "6.16.0",
32-
"babel-core": "6.17.0",
33-
"babel-loader": "6.2.5",
34-
"babel-preset-latest": "6.16.0",
35-
"babel-register": "6.16.3",
36-
"chai": "3.5.0",
37-
"chalk": "1.1.3",
38-
"cheerio": "0.22.0",
39-
"compression": "1.6.2",
40-
"cross-env": "3.1.3",
41-
"css-loader": "0.25.0",
42-
"eslint": "3.8.1",
43-
"eslint-plugin-import": "2.0.1",
44-
"eslint-watch": "2.1.14",
45-
"express": "4.14.0",
46-
"extract-text-webpack-plugin": "1.0.1",
47-
"html-webpack-plugin": "2.22.0",
48-
"jsdom": "9.8.0",
49-
"json-schema-faker": "0.3.6",
50-
"json-server": "0.8.22",
51-
"localtunnel": "1.8.1",
52-
"mocha": "3.1.2",
53-
"nock": "8.1.0",
54-
"npm-run-all": "3.1.1",
55-
"nsp": "2.6.2",
56-
"numeral": "1.5.3",
31+
"babel-cli": "6.26.0",
32+
"babel-core": "6.26.0",
33+
"babel-loader": "7.1.2",
34+
"babel-preset-env": "1.6.0",
35+
"babel-register": "6.26.0",
36+
"chai": "4.1.2",
37+
"chalk": "2.1.0",
38+
"cheerio": "1.0.0-rc.2",
39+
"compression": "1.7.1",
40+
"cross-env": "5.0.5",
41+
"css-loader": "0.28.7",
42+
"eslint": "4.8.0",
43+
"eslint-plugin-import": "2.7.0",
44+
"eslint-watch": "3.1.2",
45+
"express": "4.16.2",
46+
"extract-text-webpack-plugin": "3.0.1",
47+
"html-webpack-plugin": "2.30.1",
48+
"jsdom": "9.11.0",
49+
"json-schema-faker": "0.4.0",
50+
"json-server": "0.12.0",
51+
"localtunnel": "1.8.3",
52+
"mocha": "4.0.1",
53+
"nock": "9.0.22",
54+
"npm-run-all": "4.1.1",
55+
"nsp": "2.8.1",
56+
"numeral": "2.0.6",
5757
"open": "0.0.5",
58-
"rimraf": "2.5.4",
59-
"style-loader": "0.13.1",
60-
"surge": "0.18.0",
61-
"webpack": "1.13.2",
62-
"webpack-dev-middleware": "1.8.4",
63-
"webpack-hot-middleware": "2.13.0",
58+
"rimraf": "2.6.2",
59+
"style-loader": "0.19.0",
60+
"surge": "0.19.0",
61+
"webpack": "3.6.0",
62+
"webpack-dev-middleware": "1.12.0",
63+
"webpack-hot-middleware": "2.19.1",
6464
"webpack-md5-hash": "0.0.5"
6565
}
6666
}

src/api/baseUrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function getBaseUrl() {
44

55
function getQueryStringParameterByName(name, url) {
66
if(!url) url = window.location.href;
7-
name = name.replace(/[\[\]]/g, "\\$&");
7+
name = name.replace(/[[]]/g, "\\$&");
88
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
99
results = regex.exec(url);
1010
if(!results) return null;

webpack.config.dev.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import webpack from 'webpack';
12
import path from 'path';
23
import HtmlWebpackPlugin from 'html-webpack-plugin';
34

45
export default {
5-
debug: true,
6+
resolve: {
7+
extensions: ['*', '.js', '.jsx', '.json']
8+
},
69
devtool: 'inline-source-map',
7-
noInfo: false,
810
entry: [
911
path.resolve(__dirname, 'src/index')
1012
],
@@ -15,16 +17,21 @@ export default {
1517
filename: 'bundle.js'
1618
},
1719
plugins: [
20+
new webpack.LoaderOptionsPlugin({
21+
minimize: false,
22+
debug: true,
23+
noInfo: true // set to false to see a list of every file being bundled.
24+
}),
1825
// Create HTML file that includes reference to bundled JS.
19-
new HtmlWebpackPlugin({
26+
new HtmlWebpackPlugin({
2027
template: 'src/index.html',
2128
inject: true
2229
})
2330
],
2431
module: {
25-
loaders: [
26-
{test: /\.js$/, exclude: /node_modules/, loaders: ['babel']},
27-
{test: /\.css$/, loaders: ['style','css']}
32+
rules: [
33+
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'},
34+
{test: /\.css$/, use: ['style-loader','css-loader']}
2835
]
2936
}
30-
}
37+
}

webpack.config.prod.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import path from 'path';
21
import webpack from 'webpack';
2+
import path from 'path';
33
import HtmlWebpackPlugin from 'html-webpack-plugin';
44
import WebpackMd5Hash from 'webpack-md5-hash';
55
import ExtractTextPlugin from 'extract-text-webpack-plugin';
66

77
export default {
8-
debug: true,
8+
resolve: {
9+
extensions: ['*', '.js', '.jsx', '.json']
10+
},
911
devtool: 'source-map',
10-
noInfo: false,
1112
entry: {
1213
vendor: path.resolve(__dirname, 'src/vendor'),
1314
main: path.resolve(__dirname, 'src/index')
@@ -19,17 +20,27 @@ export default {
1920
filename: '[name].[chunkhash].js'
2021
},
2122
plugins: [
23+
// Global loader configuration
24+
new webpack.LoaderOptionsPlugin({
25+
minimize: true,
26+
debug: false,
27+
noInfo: true // set to false to see a list of every file being bundled.
28+
}),
29+
2230
// Generate an external css file with a hash in the filename
2331
new ExtractTextPlugin('[name].[contenthash].css'),
32+
2433
// Hash the files using MD5 so that their names change when the content changes.
2534
new WebpackMd5Hash(),
35+
2636
// Use CommonsChunkPlugin to create a separate bundle
2737
// of vendor libraries so that they're cached separately.
2838
new webpack.optimize.CommonsChunkPlugin({
2939
name: 'vendor'
3040
}),
41+
3142
// Create HTML file that includes reference to bundled JS.
32-
new HtmlWebpackPlugin({
43+
new HtmlWebpackPlugin({
3344
template: 'src/index.html',
3445
minify: {
3546
removeComments: true,
@@ -48,15 +59,14 @@ export default {
4859
// using htmlWebpackPlugin.options.varName
4960
trackJSToken: 'a04ce9b4a6f54171a996364ca786c5c8'
5061
}),
51-
// Eliminate duplicate packages when generating bundle
52-
new webpack.optimize.DedupePlugin(),
62+
5363
// Minify JS
5464
new webpack.optimize.UglifyJsPlugin()
5565
],
5666
module: {
57-
loaders: [
58-
{test: /\.js$/, exclude: /node_modules/, loaders: ['babel']},
59-
{test: /\.css$/, loader: ExtractTextPlugin.extract('css?sourceMap')}
67+
rules: [
68+
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'},
69+
{test: /\.css$/, loader: ExtractTextPlugin.extract('css-loader?sourceMap')}
6070
]
6171
}
62-
}
72+
};

0 commit comments

Comments
 (0)