2018-09-20 13:13:59 +00:00
|
|
|
let fs = require('fs-extra');
|
|
|
|
|
|
|
|
let source = './build/phaser-facebook-instant-games.js';
|
|
|
|
let sourceMap = './build/phaser-facebook-instant-games.js.map';
|
2018-09-20 15:58:23 +00:00
|
|
|
let destFolder = '../fbtest1/lib/';
|
|
|
|
let dest = '../fbtest1/lib/phaser-facebook-instant-games.js';
|
|
|
|
let destMap = '../fbtest1/lib/phaser-facebook-instant-games.js.map';
|
2018-09-20 13:13:59 +00:00
|
|
|
|
2018-09-20 15:58:23 +00:00
|
|
|
if (fs.existsSync(destFolder))
|
2018-09-20 13:13:59 +00:00
|
|
|
{
|
|
|
|
fs.copy(sourceMap, destMap, function (err) {
|
|
|
|
|
|
|
|
if (err)
|
|
|
|
{
|
|
|
|
return console.error(err);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
fs.copy(source, dest, function (err) {
|
|
|
|
|
|
|
|
if (err)
|
|
|
|
{
|
|
|
|
return console.error(err);
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log('Build copied to ' + dest);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|