Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

titanium

Package Overview
Dependencies
Maintainers
3
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

titanium

Appcelerator Titanium CLI package

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
210
decreased by-68.89%
Maintainers
3
Weekly downloads
 
Created
Source

Titanium CLI

A node.js based command line interface for Titanium Mobile. Not a replacement for Studio IDE, but a driver for non-Studio users and usable interface for continuous integration. Laser focus on easy setup and use. Hit us up on the twitter or at community at appcelerator dot com with questions.

Usage

Install

  • Install a binary distribution of node.js
  • npm install -g titanium
  • titanium configure

Docs

Run titanium with no arguments for a list of commands. Run titanium help [command] for help on a specific command.

Contributing

Contributors to this project are required to sign Appcelerator's standard contributor license agreement. Once that's taken care of, pull requests will be processed with extreme prejudice.

Setup

Install all dependencies for the CLI by running npm install at the top level project directory. Dependencies should all be declared in package.json.

Adding a new built-in command

  • Add a file by the name of your command to the lib/commands directory
  • Require that file into the commands object created in lib/commands/index.js - this is required by the main CLI script
  • Implement a command module with the following interface:
var logger;

exports.doc = {
	command: 'titanium clean', 
	description: 'Clean the project build directories', 
	usage: 'titanium clean [ios,android,mobileweb] [OPTIONS]', 
	options: [
		['-p, --path <path>', 'Project path to clean - defaults to current working directory'],
		['-v, --verbose', 'Verbose logging output']
	]
};

exports.execute = function(args,options,_logger) {
	logger = _logger;
	//execute your command.  The main driver script will call your function with:

	// args & options: the command line arguments passed to the script.  
	// Examples:
	//     titanium run iphone
	//         args: ['iphone']
	//         options: {}
	//     titanium run iphone -v 
	//         args: ['iphone']
	//         options: { 'verbose': true }
	//     titanium create MyApp --verbose 
	//         args: ['MyApp']
	//         options: { 'verbose': true }
	//     titanium create MyApp -p /Users/kevin -v --sdk /dev/ti-1.6 
	//         args: ['MyApp']
	//         options: { 
	//             'path': '/Users/kevin',
	//             'verbose': true,
	//             'sdk': '/dev/ti-1.6' 
    //         }
		
	//logger - a logging object which prints colorized log messages and will skip debug messages if -v is not present. Usage:
	//logger.info('regular text');
	//logger.error('red scary text');
	//logger.warn('yellow warning text');
	//logger.debug('blue text you only see when -v or --verbose is passed in');	
};

Adding an extension command

Coming soon. Should be installable as an npm module.

Testing

Tests for the Titanium CLI are implemented with nodeunit. If you submit a command, be a lamb and write a test or two to make sure it works in the tests directory. This file should be named the same as your command. To run/contribute tests:

  • npm install -g nodeunit
  • touch tests/[command name].js
  • Implement tests per the documentation here
  • Run test suite with nodeunit tests

Installing your local version of the binary

Run npm install -g . at the top level directory to have npm install the titanium binary command on your system path.

Feature requests, bugs, comments...

Log them on the project's Issues page.

FAQs

Package last updated on 10 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc