fisrt commit
This commit is contained in:
60
node_modules/phaser/config/webpack-nospector.config.js
generated
vendored
Normal file
60
node_modules/phaser/config/webpack-nospector.config.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
module.exports = [
|
||||
|
||||
{
|
||||
mode: 'development',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js'
|
||||
},
|
||||
|
||||
devtool: 'source-map',
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../build/`,
|
||||
globalObject: 'this',
|
||||
sourceMapFilename: '[file].map',
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string
|
||||
devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string
|
||||
filename: '[name].js',
|
||||
library: {
|
||||
name: 'Phaser',
|
||||
type: 'umd',
|
||||
umdNamedDefine: true,
|
||||
}
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_DEBUG": JSON.stringify(false),
|
||||
"typeof EXPERIMENTAL": 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)
|
||||
}),
|
||||
{
|
||||
apply: (compiler) => {
|
||||
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
|
||||
exec('node scripts/copy-to-examples-watch.js', (err, stdout, stderr) => {
|
||||
if (stdout) process.stdout.write(stdout);
|
||||
if (stderr) process.stderr.write(stderr);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
devtool: 'source-map'
|
||||
}
|
||||
];
|
||||
60
node_modules/phaser/config/webpack.config.js
generated
vendored
Normal file
60
node_modules/phaser/config/webpack.config.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
module.exports = [
|
||||
|
||||
{
|
||||
mode: 'development',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js'
|
||||
},
|
||||
|
||||
devtool: 'source-map',
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../build/`,
|
||||
globalObject: 'this',
|
||||
sourceMapFilename: '[file].map',
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string
|
||||
devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string
|
||||
filename: '[name].js',
|
||||
library: {
|
||||
name: 'Phaser',
|
||||
type: 'umd',
|
||||
umdNamedDefine: true,
|
||||
}
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_DEBUG": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": 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)
|
||||
}),
|
||||
{
|
||||
apply: (compiler) => {
|
||||
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
|
||||
exec('node scripts/copy-to-examples-watch.js', (err, stdout, stderr) => {
|
||||
if (stdout) process.stdout.write(stdout);
|
||||
if (stderr) process.stderr.write(stderr);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
devtool: 'source-map'
|
||||
}
|
||||
];
|
||||
128
node_modules/phaser/config/webpack.dist.config.js
generated
vendored
Normal file
128
node_modules/phaser/config/webpack.dist.config.js
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
name: 'phaser-umd',
|
||||
mode: 'production',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js',
|
||||
'phaser.min': './phaser.js',
|
||||
'phaser-arcade-physics': './phaser-arcade-physics.js',
|
||||
'phaser-arcade-physics.min': './phaser-arcade-physics.js',
|
||||
'phaser-ie9': './phaser-ie9.js',
|
||||
'phaser-ie9.min': './phaser-ie9.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../dist/`,
|
||||
filename: '[name].js',
|
||||
globalObject: 'this',
|
||||
library: {
|
||||
name: 'Phaser',
|
||||
type: 'umd',
|
||||
umdNamedDefine: true,
|
||||
}
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
include: /\.min\.js$/,
|
||||
parallel: true,
|
||||
extractComments: false,
|
||||
terserOptions: {
|
||||
format: {
|
||||
comments: false
|
||||
},
|
||||
compress: true,
|
||||
ie8: false,
|
||||
ecma: 5,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_DEBUG": JSON.stringify(false),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
}),
|
||||
|
||||
new CleanWebpackPlugin()
|
||||
]
|
||||
},
|
||||
{
|
||||
experiments: {
|
||||
outputModule: true,
|
||||
},
|
||||
|
||||
name: 'phaser-esm',
|
||||
mode: 'production',
|
||||
dependencies: [ 'phaser-umd' ],
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
'phaser.esm': './phaser-esm.js',
|
||||
'phaser.esm.min': './phaser-esm.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../dist/`,
|
||||
filename: '[name].js',
|
||||
library: {
|
||||
type: 'module'
|
||||
}
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
include: /\.min\.js$/,
|
||||
parallel: true,
|
||||
extractComments: false,
|
||||
terserOptions: {
|
||||
format: {
|
||||
comments: false
|
||||
},
|
||||
compress: true,
|
||||
ie8: false,
|
||||
ecma: 6,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_DEBUG": JSON.stringify(false),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
})
|
||||
]
|
||||
}
|
||||
];
|
||||
51
node_modules/phaser/config/webpack.fb.config.js
generated
vendored
Normal file
51
node_modules/phaser/config/webpack.fb.config.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../build/`,
|
||||
filename: 'phaser-facebook-instant-games.js',
|
||||
library: 'Phaser',
|
||||
libraryTarget: 'umd',
|
||||
sourceMapFilename: '[file].map',
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]', // string
|
||||
devtoolFallbackModuleFilenameTemplate: 'webpack:///[resource-path]?[hash]', // string
|
||||
umdNamedDefine: true
|
||||
},
|
||||
|
||||
performance: { hints: 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(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
}),
|
||||
{
|
||||
apply: (compiler) => {
|
||||
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
|
||||
exec('node scripts/copy-to-examples-fb.js', (err, stdout, stderr) => {
|
||||
if (stdout) process.stdout.write(stdout);
|
||||
if (stderr) process.stderr.write(stderr);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
devtool: 'source-map'
|
||||
};
|
||||
56
node_modules/phaser/config/webpack.fb.dist.config.js
generated
vendored
Normal file
56
node_modules/phaser/config/webpack.fb.dist.config.js
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
'phaser-facebook-instant-games': './phaser.js',
|
||||
'phaser-facebook-instant-games.min': './phaser.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../dist/`,
|
||||
filename: '[name].js',
|
||||
library: 'Phaser',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
include: /\.min\.js$/,
|
||||
parallel: true,
|
||||
extractComments: false,
|
||||
terserOptions: {
|
||||
format: {
|
||||
comments: false
|
||||
},
|
||||
compress: true,
|
||||
ie8: false,
|
||||
ecma: 5,
|
||||
warnings: 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(false),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
})
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user