mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-26 17:10:11 -04:00
49 lines
1.6 KiB
JavaScript
49 lines
1.6 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
var fs = require('fs');
|
|
var path = require('path');
|
|
|
|
var rootdir = process.argv[2];
|
|
|
|
if (rootdir)
|
|
{
|
|
console.log("Root: " + rootdir);
|
|
|
|
// 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;
|
|
|
|
// if (platform === 'android')
|
|
// {
|
|
// testBuildPath = path.join(rootdir, 'platforms', platform, 'app', 'assets', 'www', 'build');
|
|
// }
|
|
// else
|
|
// {
|
|
// testBuildPath = path.join(rootdir, 'platforms', platform, 'app', 'www', 'build');
|
|
// }
|
|
|
|
// 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);
|
|
// }
|
|
}
|
|
}
|