mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
New dist scripts for Phaser 3D
This commit is contained in:
parent
239edd5296
commit
427b1aa019
5 changed files with 62 additions and 3 deletions
58
config/webpack.3d.dist.config.js
Normal file
58
config/webpack.3d.dist.config.js
Normal file
|
@ -0,0 +1,58 @@
|
|||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js',
|
||||
'phaser.min': './phaser.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../dist/`,
|
||||
filename: '[name]3d.js',
|
||||
library: 'Phaser',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJSPlugin({
|
||||
include: /\.min\.js$/,
|
||||
parallel: true,
|
||||
sourceMap: false,
|
||||
uglifyOptions: {
|
||||
compress: true,
|
||||
ie8: false,
|
||||
ecma: 5,
|
||||
output: {comments: false},
|
||||
warnings: false
|
||||
},
|
||||
warningsFilter: () => false
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(true),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
}),
|
||||
|
||||
new CleanWebpackPlugin()
|
||||
]
|
||||
};
|
|
@ -49,7 +49,7 @@ module.exports = {
|
|||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(true),
|
||||
"typeof PLUGIN_3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = {
|
|||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(true),
|
||||
"typeof PLUGIN_3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
|
|
|
@ -46,7 +46,7 @@ module.exports = {
|
|||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(true),
|
||||
"typeof PLUGIN_3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"buildfb": "webpack --config config/webpack.fb.config.js",
|
||||
"watchfb": "webpack --config config/webpack.fb.config.js --watch",
|
||||
"dist": "webpack --config config/webpack.dist.config.js",
|
||||
"dist3d": "webpack --config config/webpack.3d.dist.config.js",
|
||||
"distfb": "webpack --config config/webpack.fb.dist.config.js",
|
||||
"distfull": "npm run dist && npm run distfb",
|
||||
"plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js",
|
||||
|
|
Loading…
Reference in a new issue