mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Update copy-to-examples-watch.js
This commit is contained in:
parent
ea48bcf491
commit
a376f3d690
1 changed files with 26 additions and 1 deletions
|
@ -5,6 +5,9 @@ let sourceMap = './build/phaser.js.map';
|
|||
let dest = '../phaser3-examples/public/build/dev.js';
|
||||
let destDir = '../phaser3-examples/public/build/';
|
||||
let destMap = '../phaser3-examples/public/build/phaser.js.map';
|
||||
let dest2 = '../examples/public/build/dev.js';
|
||||
let dest2Dir = '../examples/public/build/';
|
||||
let dest2Map = '../examples/public/build/phaser.js.map';
|
||||
|
||||
if (fs.existsSync(destDir))
|
||||
{
|
||||
|
@ -28,7 +31,29 @@ if (fs.existsSync(destDir))
|
|||
|
||||
});
|
||||
}
|
||||
else if (fs.existsSync(dest2Dir))
|
||||
{
|
||||
fs.copy(sourceMap, dest2Map, function (err) {
|
||||
|
||||
if (err)
|
||||
{
|
||||
return console.error(err);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
fs.copy(source, dest2, function (err) {
|
||||
|
||||
if (err)
|
||||
{
|
||||
return console.error(err);
|
||||
}
|
||||
|
||||
console.log('Build copied to ' + dest2);
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples');
|
||||
console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples or ../examples');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue