Created
February 7, 2014 14:44
-
-
Save dancourse/8863879 to your computer and use it in GitHub Desktop.
Remove then re-add phonegap plugins with a grunt shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shell: { | |
restorePlugins :{ | |
command: function () | |
{ | |
var toReturn = []; | |
var allPlugins = ["camera", "console", "device", "keyboard", "splashscreen", "statusbar", "file", "dialogs", "vibration"]; | |
var preCommand = "org.apache.cordova."; | |
toReturn.push('echo "[calvium] Restoring plugins"'); | |
for(var x in allPlugins) | |
{ | |
toReturn.push("phonegap plugin remove "+preCommand+allPlugins[x]); | |
} | |
for(x in allPlugins) | |
{ | |
toReturn.push("phonegap plugin add "+preCommand+allPlugins[x]); | |
} | |
toReturn.push('say Done, good luck'); | |
return toReturn.join('&&'); | |
}, | |
options: { | |
stdout: true | |
} | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment