Alloy+Titanium toolchain with superpowers.
Pull request Compare This branch is 523 commits behind trimethyl:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docset
framework
guides
test-application
.gitignore
.npmignore
LICENSE
README.md
cli.js
gendoc.sh
jsdoc.conf.json
logo.jpg
map.json
package.json
publisher.sh
test.sh
version.sh

README.md

image

Trimethyl is a collection of very useful modules to work with Appcelerator Titanium.

Most of these modules are proxies for Titanium API, and some of these add missing features or expose useful functions for cross platform development.

Check the API Documentation

Check the Wiki

Download Dash Kapeli Docset


NPM version NPM downloads

![Gitter](https://badges.gitter.im/Join Chat.svg)

Installation via NPM

NPM

Install globally with npm:

[sudo] npm install -g trimethyl

In your Titanium project, now you have the command trimethyl, run:

trimethyl install

Configure modules

You can specify which modules you want to install, just type:

trimethyl add {module}

Or edit the trimethyl.json file in your project directory.

Configuration

Each module reads from the config.json your personal configuration, extending its default.

For example, the module named {Module}, will read the Alloy.CFG.T.{module} object; the submodule {Sub} of {Module}, will read Alloy.CFG.T.{module}.{submodule}; etc..

You can customize the options, editing your config.json file:

{
	"T":{
		"module": {
			...
			"sub": {
				...
			}
		},
	}
}

Initialization

In your app/alloy.js file:

T = function (name) { return require('T/'+name); }
T('trimethyl');

T it's an easier method to load Trimethyl modules.

Requiring trimethyl by T('trimethyl') module on startup will bootstrap some important framework files, set prototypes, TSS vars and Alloy.Globals variables.

Modules

To use a module, just require with T helper:

var Util = T('util'); /* same of require('T/util') */

It's useful to declare global modules that you'll use in the entire app in the alloy.js file to make them available through the variable name.

UIFactory module

This is an Alloy feature: the ability to create UI objects directly from Alloy Views, using the module keyword. For example:

<Alloy>
	<Window title="Awesome window" module="T/uifactory">
		<TextField module="T/uifactory" />
	</Window>
</Alloy>

You can obviously wrap these elements again with your own modules, creating a further module, for example creating a ui.js file in your app/lib directory:

exports.createWindow = function(args) {
	var $el = T('uifactory').createWindow(args);

	// ...

	return $el;
}

API Documentation

Please refer to the documentation for full-usage of all APIs.

Dash Kapeli URL

dash-feed://https%3A%2F%2Fraw.githubusercontent.com%2Fcaffeinalab%2Ftrimethyl%2Fmaster%2Fdocset%2FTrimethyl.xml

Copyright and license

Copyright 2014 Caffeina srl under the MIT license.