build(cordova): simplify build, use cordova in a more standard way
This commit is contained in:
parent
4ccf10d1b3
commit
d5e6b8fab8
14 changed files with 175 additions and 133 deletions
|
|
@ -5,10 +5,11 @@
|
|||
//
|
||||
|
||||
var templates = {
|
||||
'package.json': '/',
|
||||
'Makefile': 'cordova/',
|
||||
'ProjectMakefile': 'cordova/',
|
||||
'config.xml': 'cordova/',
|
||||
'config-template.xml': '/',
|
||||
'ionic.config.json': '/',
|
||||
'Package.appxmanifest': 'cordova/wp/',
|
||||
'.desktop': 'webkitbuilds/',
|
||||
'setup-win.iss': 'webkitbuilds/',
|
||||
|
|
@ -60,6 +61,9 @@ Object.keys(templates).forEach(function(k) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
if(k === 'config-template.xml'){
|
||||
k = 'config.xml';
|
||||
}
|
||||
fs.writeFileSync('../' + targetDir + k, content, 'utf8');
|
||||
});
|
||||
|
||||
|
|
@ -113,7 +117,7 @@ function copyDir(from, to, cb) {
|
|||
}
|
||||
|
||||
|
||||
copyDir(configDir + '/img/', '../public/img/', function() {
|
||||
copyDir(configDir + '/img/', '../www/img/', function() {
|
||||
copyDir(configDir + '/androidRes/', '../cordova/android/res/', function() {
|
||||
copyDir(configDir + '/iosIcons/', '../cordova/ios/icons/', function() {
|
||||
copyDir(configDir + '/iosSplash/', '../cordova/ios/splash/', function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue