How to use the titanium-editor-commons.environment.validateEnvironment function in titanium-editor-commons

To help you get started, we’ve selected a few titanium-editor-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appcelerator / atom-appcelerator-titanium / lib / index.js View on Github external
});

			const setupTargets = () => {
				autoCompleteHelper.generateAutoCompleteSuggestions();
				if (os.platform() === 'darwin') {
					this.toolbar.populateiOSTargets();
				} else {
					this.toolbar.populateAndroidTargets();
				}
				this.toolbar.update({ disableUI: false });
				this.toolbar.hud.displayDefault();
				this.toolbar.LoginDetails();
				this.checkForUpdates();
			};

			const { missing } = await environment.validateEnvironment();

			if (missing.length) {
				let message = 'You are missing the following required components for Titanium development:';
				for (let i = 0; i < missing.length; i++) {
					const product = missing[i];
					if (i < missing.length - 1) {
						message = `${message} ${product.name},`;
					} else {
						message = `${message} ${product.name}`;
					}
				}
				message = `${message}. Without these components the package will be unusable.`;

				const errorNotification = atom.notifications.addError(message, {
					buttons: [
						{
github appcelerator / vscode-appcelerator-titanium / src / extension.ts View on Github external
vscode.window.withProgress({ cancellable: false, location: vscode.ProgressLocation.Notification, title: 'Titanium' }, async progress => {
			progress.report({
				message: 'Validating environment'
			});

			const { missing } = await environment.validateEnvironment();

			if (missing.length) {
				let message = 'You are missing the following required components for Titanium development:';
				for (let i = 0; i < missing.length; i++) {
					const product = missing[i];
					if (i < missing.length - 1) {
						message = `${message} ${product.name},`;
					} else {
						message = `${message} ${product.name}`;
					}
				}
				message = `${message}. Without these components the extension will be unusable.`;
				const choices: InteractionChoice[] = [
					{
						title: 'Install',
						run: async (): Promise => {

titanium-editor-commons

`titanium-editor-commons` is a commons library for the [Atom](https://github.com/appcelerator/atom-appcelerator-titanium) and [VS Code](https://github.com/appcelerator/vscode-appcelerator-titanium) editor plugins for [Titanium SDK](https://github.com/appc

Apache-2.0
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages