Created
June 10, 2014 08:02
-
-
Save sgimeno/f636e2b71c7529ac6ee4 to your computer and use it in GitHub Desktop.
Cordova hooks
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
#!/usr/bin/env node | |
//this hook installs all your plugins | |
// add your plugins to this list--either | |
// the identifier, the filesystem location | |
// or the URL | |
var pluginlist = [ | |
'https://github.com/cogitor/PhoneGap-OrientationLock.git', | |
'org.apache.cordova.camera', | |
'org.apache.cordova.file', | |
'org.apache.cordova.file-transfer', | |
'org.apache.cordova.geolocation', | |
'org.apache.cordova.splashscreen' | |
]; | |
// no need to configure below | |
var fs = require('fs'); | |
var path = require('path'); | |
var sys = require('sys') | |
var exec = require('child_process').exec; | |
function puts(error, stdout, stderr) { | |
sys.puts(stdout) | |
} | |
pluginlist.forEach(function(plug) { | |
exec("cordova plugin add " + plug, puts); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment