mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Remove open-ide and fold into run ios-device
This commit is contained in:
@@ -414,7 +414,7 @@ var ensureCordovaPlugins = function (localPath, options) {
|
||||
files.rm_recursive(path.join(cordovaPath, 'platforms'));
|
||||
cordova.ensureCordovaPlatforms(localPath);
|
||||
};
|
||||
process.stdout.write("Resetting Cordova plugins...\n");
|
||||
process.stdout.write("Initializing Cordova plugins...\n");
|
||||
uninstallAllPlugins();
|
||||
|
||||
// Now install all of the plugins.
|
||||
@@ -533,9 +533,18 @@ var execCordovaOnPlatform = function (localPath, platformName, options) {
|
||||
isDevice ? '--device' : '--emulator',
|
||||
platform ];
|
||||
|
||||
// XXX error if not a Cordova project
|
||||
execFileAsyncOrThrow(localCordova, args, { verbose: options.verbose,
|
||||
cwd: cordovaPath });
|
||||
// XXX assert we have a valid Cordova project
|
||||
if (platform === 'ios' && isDevice) {
|
||||
// ios-deploy is super buggy, so we just open xcode and let the user
|
||||
// start the app themselves. XXX print a message about this?
|
||||
execFileSyncOrThrow('sh',
|
||||
['-c', 'open ' + path.join(localPath, 'cordova-build',
|
||||
'platforms', 'ios', '*.xcodeproj')]);
|
||||
} else {
|
||||
execFileAsyncOrThrow(localCordova, args, { verbose: options.verbose,
|
||||
cwd: cordovaPath });
|
||||
}
|
||||
|
||||
var Log = getLoadedPackages().logging.Log;
|
||||
|
||||
var androidMapper = function (line) {
|
||||
|
||||
@@ -939,51 +939,6 @@ main.registerCommand({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// open-ide
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
main.registerCommand({
|
||||
name: 'open-ide',
|
||||
requiresApp: true,
|
||||
minArgs: 1,
|
||||
maxArgs: Infinity,
|
||||
options: {
|
||||
settings: { type: String },
|
||||
port: { type: String, short: "p", default: 'localhost:3000' },
|
||||
production: { type: Boolean }
|
||||
}
|
||||
}, function (options) {
|
||||
// XXX replace try-catch with buildmessage.capture
|
||||
try {
|
||||
var localPath = path.join(options.appDir, '.meteor', 'local');
|
||||
var platforms = options.args;
|
||||
|
||||
// check that every passed argument is in fact a platform we can build for
|
||||
_.each(platforms, cordova.checkIsValidPlatform);
|
||||
|
||||
var parsedHostPort = parseHostPort(options.port);
|
||||
|
||||
// open projects in ides
|
||||
cordova.preparePlatforms(localPath, platforms,
|
||||
_.extend({ debug: ! options.production,
|
||||
appName: path.basename(options.appDir) },
|
||||
options, parsedHostPort));
|
||||
|
||||
_.each(platforms, function (platform) {
|
||||
if (platform !== 'ios')
|
||||
throw new Error(platform + ": unsupported platform for 'open-ide' command. Only 'ios' is supportted at the moment.");
|
||||
|
||||
execFileSync('sh', ['-c', 'open ' + path.join(localPath, 'cordova-build', 'platforms', 'ios', '*.xcodeproj')]);
|
||||
});
|
||||
} catch (err) {
|
||||
process.stderr.write(err.message + '\n');
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// authorized
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user