fixes
This commit is contained in:
parent
56e68c169b
commit
ddde39ee11
1 changed files with 5 additions and 33 deletions
|
|
@ -23,8 +23,6 @@ var MakefileHeader = "# PLEASE! Do not edit this file directly \n# Modify
|
||||||
var fs = require('fs-extra');
|
var fs = require('fs-extra');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var configBlob = fs.readFileSync(configDir + '/appConfig.json', 'utf8');
|
var configBlob = fs.readFileSync(configDir + '/appConfig.json', 'utf8');
|
||||||
var config = JSON.parse(configBlob, 'utf8');
|
var config = JSON.parse(configBlob, 'utf8');
|
||||||
|
|
||||||
|
|
@ -101,43 +99,17 @@ try {
|
||||||
}
|
}
|
||||||
fs.writeFileSync('../externalServices.json', externalServices, 'utf8');
|
fs.writeFileSync('../externalServices.json', externalServices, 'utf8');
|
||||||
|
|
||||||
function copyDir(from, to, cb) {
|
function copyDir(from, to) {
|
||||||
console.log('Copying dir ' + from + ' to ' + to);
|
console.log('Copying dir ' + from + ' to ' + to);
|
||||||
if (fs.existsSync(to)) fs.removeSync(to); // remove previous app directory
|
if (fs.existsSync(to)) fs.removeSync(to); // remove previous app directory
|
||||||
if (!fs.existsSync(from)) return; // nothing to do
|
if (!fs.existsSync(from)) return; // nothing to do
|
||||||
var files = [];
|
fs.copySync(from, to);
|
||||||
fs.walk(from)
|
|
||||||
.on('data', function(item) {
|
|
||||||
if ((item.stats["mode"] & 0x4000)) {
|
|
||||||
|
|
||||||
var tmp = item.path + '/';
|
|
||||||
var l = tmp.length - from.length;
|
|
||||||
if (tmp.indexOf(from) == l) return; // #same dir
|
|
||||||
|
|
||||||
}
|
|
||||||
if (item.path.indexOf('DS_Store') >= 0) return;
|
|
||||||
|
|
||||||
if (!files.includes(path.dirname(item.path))) {
|
|
||||||
files.push(item.path);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.on('end', function() {
|
|
||||||
files.forEach(function(i) {
|
|
||||||
console.log(' # ' + i);
|
|
||||||
fs.copySync(i, to);
|
|
||||||
})
|
|
||||||
return cb();
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push Notification
|
// Push Notification
|
||||||
fs.copySync(configDir + '/GoogleService-Info.plist', '../GoogleService-Info.plist');
|
fs.copySync(configDir + '/GoogleService-Info.plist', '../GoogleService-Info.plist');
|
||||||
fs.copySync(configDir + '/google-services.json', '../google-services.json');
|
fs.copySync(configDir + '/google-services.json', '../google-services.json');
|
||||||
|
|
||||||
copyDir(configDir + '/img', '../www/img/app', function() {
|
copyDir(configDir + '/img', '../www/img/app');
|
||||||
copyDir(configDir + '/saas', '../src/sass/app', function() {
|
copyDir(configDir + '/sass', '../src/sass/app');
|
||||||
console.log("apply.js finished. \n\n");
|
console.log("apply.js finished. \n\n");
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue