49 lines
1.6 KiB
JavaScript
Raw Normal View History

2017-08-22 18:14:42 -04:00
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var rootdir = process.argv[2];
if (rootdir)
{
console.log("Root: " + rootdir);
2017-08-22 18:14:42 -04:00
// go through each of the platform directories that have been prepared
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
for (var x = 0; x < platforms.length; x++)
{
// // open up the index.html file at the www root
// try
// {
// var platform = platforms[x].trim().toLowerCase();
// var testBuildPath;
2017-08-22 18:14:42 -04:00
// if (platform === 'android')
// {
// testBuildPath = path.join(rootdir, 'platforms', platform, 'app', 'assets', 'www', 'build');
// }
// else
// {
// testBuildPath = path.join(rootdir, 'platforms', platform, 'app', 'www', 'build');
// }
2017-08-22 18:14:42 -04:00
// if (fs.existsSync(testBuildPath))
// {
// console.log('Removing map files from assets after prepare: ' + testBuildPath);
// fs.unlinkSync(testBuildPath + '/vendor.js.map');
// fs.unlinkSync(testBuildPath + '/main.js.map');
// fs.unlinkSync(testBuildPath + '/main.css.map');
// }
// else
// {
// console.log('Build dir @ ' + testBuildPath + ' does not exist for removal');
// }
// } catch (e)
// {
// process.stdout.write(e);
// }
2017-08-22 18:14:42 -04:00
}
}