Skip to content

Commit 52ca9d2

Browse files
committed
Update packages
1 parent b6f2c80 commit 52ca9d2

4 files changed

Lines changed: 2624 additions & 510 deletions

File tree

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dist": "webpack --config webpack.dist.config.js",
2121
"lint": "eslint --config .eslintrc.json \"src/**/*.js\"",
2222
"lintfix": "eslint --config .eslintrc.json \"src/**/*.js\" --fix",
23-
"sloc": "node-sloc './src' --include-extensions \"js\""
23+
"sloc": "node-sloc \"./src\" --include-extensions \"js\""
2424
},
2525
"keywords": [
2626
"2d",
@@ -35,17 +35,18 @@
3535
"web audio"
3636
],
3737
"devDependencies": {
38-
"clean-webpack-plugin": "^0.1.18",
39-
"eslint": "^4.13.1",
38+
"clean-webpack-plugin": "^0.1.19",
39+
"eslint": "^4.19.0",
4040
"fs-extra": "^5.0.0",
4141
"node-sloc": "^0.1.10",
4242
"raw-loader": "^0.5.1",
43-
"uglifyjs-webpack-plugin": "^1.1.2",
44-
"uuid": "^3.1.0",
45-
"webpack": "^3.11.0",
43+
"uglifyjs-webpack-plugin": "^1.2.4",
44+
"uuid": "^3.2.1",
45+
"webpack": "^4.1.1",
46+
"webpack-cli": "^2.0.12",
4647
"webpack-shell-plugin": "^0.5.0"
4748
},
4849
"dependencies": {
49-
"eventemitter3": "^3.0.0"
50+
"eventemitter3": "^3.0.1"
5051
}
5152
}

webpack.config.js

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,40 @@ const webpack = require('webpack');
44
const WebpackShellPlugin = require('webpack-shell-plugin');
55

66
module.exports = {
7+
mode: 'development',
78

89
context: `${__dirname}/src/`,
910

10-
entry: {
11-
phaser: './phaser.js'
12-
},
11+
entry: {phaser: './phaser.js'},
1312

1413
output: {
1514
path: `${__dirname}/build/`,
1615
filename: '[name].js',
1716
library: 'Phaser',
1817
libraryTarget: 'umd',
1918
sourceMapFilename: '[file].map',
20-
devtoolModuleFilenameTemplate: "webpack:///[resource-path]", // string
21-
devtoolFallbackModuleFilenameTemplate: "webpack:///[resource-path]?[hash]", // string
22-
umdNamedDefine: true,
19+
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string
20+
devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string
21+
umdNamedDefine: true
2322
},
2423

2524
module: {
2625
rules: [
27-
{
28-
test: [ /\.vert$/, /\.frag$/ ],
29-
use: 'raw-loader'
30-
}
26+
{
27+
test: [ /\.vert$/, /\.frag$/ ],
28+
use: 'raw-loader'
29+
}
3130
]
3231
},
3332

3433
plugins: [
35-
3634
new webpack.DefinePlugin({
37-
'CANVAS_RENDERER': JSON.stringify(true),
38-
'WEBGL_RENDERER': JSON.stringify(true)
35+
CANVAS_RENDERER: JSON.stringify(true),
36+
WEBGL_RENDERER: JSON.stringify(true)
3937
}),
4038

41-
new WebpackShellPlugin({
42-
onBuildExit: 'node copy-to-examples.js'
43-
})
44-
39+
new WebpackShellPlugin({onBuildExit: 'node copy-to-examples.js'})
4540
],
4641

4742
devtool: 'source-map'
48-
4943
};

webpack.dist.config.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
55
const CleanWebpackPlugin = require('clean-webpack-plugin');
66

77
module.exports = {
8+
mode: 'production',
89

910
context: `${__dirname}/src/`,
1011

1112
entry: {
12-
'phaser': './phaser.js',
13+
phaser: './phaser.js',
1314
'phaser.min': './phaser.js',
1415
'phaser-arcade-physics': './phaser-arcade-physics.js',
1516
'phaser-arcade-physics.min': './phaser-arcade-physics.js'
@@ -25,21 +26,22 @@ module.exports = {
2526

2627
module: {
2728
rules: [
28-
{
29-
test: [ /\.vert$/, /\.frag$/ ],
30-
use: 'raw-loader'
31-
}
29+
{
30+
test: [ /\.vert$/, /\.frag$/ ],
31+
use: 'raw-loader'
32+
}
3233
]
3334
},
3435

35-
plugins: [
36+
optimization: {minimize: false},
3637

38+
plugins: [
3739
new webpack.DefinePlugin({
38-
'CANVAS_RENDERER': JSON.stringify(true),
39-
'WEBGL_RENDERER': JSON.stringify(true)
40+
CANVAS_RENDERER: JSON.stringify(true),
41+
WEBGL_RENDERER: JSON.stringify(true)
4042
}),
4143

42-
new CleanWebpackPlugin(['dist']),
44+
new CleanWebpackPlugin([ 'dist' ]),
4345

4446
new UglifyJSPlugin({
4547
include: /\.min\.js$/,
@@ -49,14 +51,10 @@ module.exports = {
4951
compress: true,
5052
ie8: false,
5153
ecma: 5,
52-
output: {
53-
comments: false
54-
},
54+
output: {comments: false},
5555
warnings: false
5656
},
57-
warningsFilter: (src) => false
57+
warningsFilter: () => false
5858
})
59-
6059
]
61-
6260
};

0 commit comments

Comments
 (0)