How to use the node-titanium-sdk.commonOptions function in node-titanium-sdk

To help you get started, we’ve selected a few node-titanium-sdk 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 / titanium_mobile / cli / commands / clean.js View on Github external
dir = projDir;
							});

							if (!isFound && dir == root && isDefault) { // eslint-disable-line eqeqeq
								callback(true);
								return;
							}

							if (!isFound) {
								callback(new Error(__('Invalid project directory "%s" because tiapp.xml or timodule.xml not found', projectDir)));
								return;
							}
							callback(null, dir);
						}
					}
				}, ti.commonOptions(logger, config))
			};
			callback(null, conf);
		})(function (err, result) {
			finished(result);
github appcelerator / titanium_mobile / cli / commands / build.js View on Github external
dir = projDir;
								});

								if (!isFound && dir == root && isDefault) { // eslint-disable-line eqeqeq
									callback(true);
									return;
								}

								if (!isFound) {
									callback(new Error(__('Invalid project directory "%s" because tiapp.xml or timodule.xml not found', projectDir)));
									return;
								}
								callback(null, dir);
							}
						}
					}, ti.commonOptions(logger, config)),
					platforms: platformConf
				};
				callback(null, conf);
			});
		})(function (err, result) {
github appcelerator / titanium_mobile / cli / commands / create.js View on Github external
.map(function (type) {
											return {
												label: this.creators[type].title || type,
												value: type,
												order: this.creators[type].titleOrder
											};
										}, this)
										.sort(function (a, b) {
											return a.order < b.order ? -1 : a.order > b.order ? 1 : 0;
										})
								}));
							}.bind(this),
							required: true,
							values: Object.keys(this.creators)
						}
					}, ti.commonOptions(logger, config)),
					type: typeConf
				};

				callback(null, conf);
			})(function (err, result) {
				finished(result);
github appcelerator / titanium_mobile / cli / commands / project.js View on Github external
options: mix({
			output: {
				abbr: 'o',
				default: 'report',
				desc: __('output format'),
				values: [ 'report', 'json', 'text' ]
			},
			'project-dir': {
				desc: __('the directory of the project to analyze'),
				default: '.'
			},
			template: {
				desc: __('the name of the project template to use'),
				default: 'default'
			}
		}, ti.commonOptions(logger, config)),
		args: [
			{
				name: 'key',
				desc: __('the key to get or set')
			},
			{
				name: 'value',
				desc: __('the value to set the specified key')
			}
		]
	};
};