summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/cordova/clean
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/cordova/clean')
-rwxr-xr-xStoneIsland/platforms/ios/cordova/clean27
1 files changed, 24 insertions, 3 deletions
diff --git a/StoneIsland/platforms/ios/cordova/clean b/StoneIsland/platforms/ios/cordova/clean
index ae61078d..56665c48 100755
--- a/StoneIsland/platforms/ios/cordova/clean
+++ b/StoneIsland/platforms/ios/cordova/clean
@@ -19,11 +19,32 @@
under the License.
*/
-var clean = require('./lib/clean');
+var Api = require('./Api');
+var path = require('path');
+var nopt = require('nopt');
-clean.run(process.argv).done(function () {
+if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) {
+ console.log('Cleans the project directory.');
+ process.exit(0);
+}
+
+// Do some basic argument parsing
+var opts = nopt({
+ 'verbose' : Boolean,
+ 'silent' : Boolean
+}, { 'd' : '--verbose' });
+
+// Make buildOptions compatible with PlatformApi clean method spec
+opts.argv = opts.argv.original;
+
+// Skip cleaning prepared files when not invoking via cordova CLI.
+opts.noPrepare = true;
+
+require('./loggingHelper').adjustLoggerLevel(opts);
+
+new Api().clean(opts).done(function() {
console.log('** CLEAN SUCCEEDED **');
}, function(err) {
console.error(err);
process.exit(2);
-}); \ No newline at end of file
+});