#!/usr/bin/env node
/*
// A cordova hook that copies various resource files, mainly icons and splash screens, into the appropriate platform specific location
*/

// give the console some vibrant colors :)
var colors = require('colors');

/*
// This module adds a few extra file system methods that aren't included in the native fs module. 
// It is a drop in replacement for fs.
// npm install --save fs-extra
*/
var fs = require('fs-extra');

// Returns the current working directory of the process; console.log('Current directory: ' + process.cwd());
var rootDir = process.cwd();

//copies directory and subdirectories
fs.copy(rootDir + '/config/android/res', rootDir + '/platforms/android/res', function (err) {
    if (err) return console.error(err.red + ' An error occured! did you put your assets in; "config/android/res"?'.red);

    process.stdout.write('Resources successfully copied!'.green)
});
@@ -103,16 +103,20 @@
 creens, 
+%0A// 
 into the
@@ -154,16 +154,83 @@
 location
+.%0A// Version; 1.1%0A// https://github.com/numediaweb/resources_copier
 %0A*/%0A%0A// 
@@ -892,16 +892,21 @@
 id/res%22?
+ %5Cr%5Cn
 '.red);%0A
@@ -962,16 +962,21 @@
  copied!
+ %5Cr%5Cn
 '.green)
@@ -979,8 +979,429 @@
 een)%0A%7D);
+%0A%0A//Copy the AndroidManifest.xml and prevent losing changes when you delete/rebuild the platform%0Afs.copy(rootDir + '/config/android/AndroidManifest.xml', rootDir + '/platforms/android/AndroidManifest.xml', function (err) %7B%0A    if (err) return console.error(err.red + ' An error occured! Could not copy %22AndroidManifest.xml%22 %5Cr%5Cn'.red);%0A%0A    process.stdout.write('AndroidManifest.xml successfully copied! %5Cr%5Cn'.green)%0A%7D);%0A

Update resources_copier.js