Example #1
0
		function (callback) {
			if (!this.tiapp.plugins || !this.tiapp.plugins.length) {
				this.logger.info(__('No legacy Titanium plugins required, continuing'));
				callback();
				return;
			}
			
			ti.plugin.find(this.tiapp.plugins, this.projectDir, this.logger, hitch(this, function (plugins) {
				if (plugins.missing.length) {
					this.logger.error(__('Could not find all required Titanium plugins:'))
					plugins.missing.forEach(function (m) {
						this.logger.error('   id: ' + m.id + '\t version: ' + m.version);
					}, this);
					this.logger.log();
					process.exit(1);
				}
				
				// dump(plugins);
				
				callback();
			}));
		}
Example #2
0
	cli.addHook('prebuild', function (data, finished) {
		var build = data.build || {},
			tiapp = build.tiapp,
			logger = build.logger;
		
		if (tiapp && tiapp.plugins) {
			ti.plugin.find(tiapp.plugins, data.build.projectDir, logger, function (plugins) {
				gPlugins = plugins;
				
				if (plugins.missing.length) {
					logger.error(__('Could not find all required Titanium plugins:'))
					plugins.missing.forEach(function (m) {
						logger.error('   id: ' + m.id + '\t version: ' + m.version);
					});
					logger.log();
					process.exit(1);
				}
				
				fire('compile', data, finished);
			});
		} else {
			finished();
		}
	});