The Camera3D Plugin has been rebuilt for Phaser 3.50 and the webpack config updated.

This commit is contained in:
Richard Davey 2020-08-26 13:19:00 +01:00
parent 4d4b3c1cad
commit f51200479b
4 changed files with 23034 additions and 13007 deletions

View file

@ -0,0 +1,13 @@
var fs = require('fs-extra');
var source = './plugins/camera3d/dist/';
var dest = '../phaser3-examples/public/plugins/';
if (fs.existsSync(dest))
{
fs.copySync(source, dest, { overwrite: true });
}
else
{
console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples');
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,8 @@
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const exec = require('child_process').exec;
const RemovePlugin = require('remove-files-webpack-plugin');
module.exports = {
mode: 'production',
@ -42,6 +43,21 @@ module.exports = {
},
plugins: [
new CleanWebpackPlugin([ 'dist' ])
new RemovePlugin({
before: {
root: './plugins/camera3d/dist/',
include: [ 'camera3d.js', 'camera3d.min.js' ]
}
}),
{
apply: (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
exec('node plugins/camera3d/copy-to-examples.js', (err, stdout, stderr) => {
if (stdout) process.stdout.write(stdout);
if (stderr) process.stderr.write(stderr);
});
});
}
}
]
};