mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
Change create script to use Cordova as a library.
This commit is contained in:
+5
-10
@@ -19,18 +19,13 @@
|
||||
under the License.
|
||||
*/
|
||||
var path = require('path');
|
||||
var args = process.argv;
|
||||
var create = require('./lib/create');
|
||||
var args = require('./lib/simpleargs').getArgs(process.argv);
|
||||
|
||||
// Support basic help commands
|
||||
if(args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
|
||||
args[2] == 'help' || args[2] == '-help' || args[2] == '/help')) {
|
||||
console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'update')) + ' <path_to_project>');
|
||||
if (args['--help'] || args._.length === 0) {
|
||||
console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'update')) + ' <path_to_project> [--shared]');
|
||||
console.log(' --shared will use the CordovaLib project directly instead of making a copy.');
|
||||
process.exit(1);
|
||||
} else {
|
||||
create.updateProject(args[2]).done(null, function(err) {
|
||||
console.error(err);
|
||||
process.exit(2);
|
||||
});
|
||||
}
|
||||
create.updateProject(args._[0], args['--shared']).done();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user