UNPKG

8.22 kBMarkdownView Raw
1# Alloy
2
3[![Build Status](https://travis-ci.org/appcelerator/alloy.svg?branch=master)](https://travis-ci.org/appcelerator/alloy)
4[![Dependency Status](https://david-dm.org/appcelerator/alloy.svg)](https://david-dm.org/appcelerator/alloy)
5[![devDependency Status](https://david-dm.org/appcelerator/alloy/dev-status.svg)](https://david-dm.org/appcelerator/alloy#info=devDependencies)
6[![NPM version](https://badge.fury.io/js/alloy.svg)](http://badge.fury.io/js/grunt-appc-js)
7
8[![NPM](https://nodei.co/npm-dl/alloy.png)](https://nodei.co/npm/alloy/)
9
10Alloy is an MVC application framework by [Appcelerator](http://www.appcelerator.com) for [Titanium](http://www.appcelerator.com/platform). More high-level details can be found here: [http://www.appcelerator.com/platform/alloy/](http://www.appcelerator.com/platform/alloy/)
11
12## Getting Started
13
14* [Quick Start Guide](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Quick_Start) that covers _everything_ from installation to building your first app with Alloy.
15* Complete collection of [Alloy Guides](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework)
16* [Collection of test apps](https://github.com/appcelerator/alloy/tree/master/test/apps) showing various aspects of Alloy in practice.
17
18## Installation
19
20### from npm:
21
22```bash
23# install the latest stable
24[sudo] npm install -g alloy
25
26# install a specific version
27[sudo] npm install -g alloy@1.4.1
28
29# install cutting edge directly from github
30[sudo] npm install -g git://github.com/appcelerator/alloy.git
31```
32
33### from Titanium Studio
34
35...oh yeah, Studio will do it for you automatically. :)
36
37## Running Sample Test Apps
38
39Alloy includes many sample and test apps in the **test/apps** folder (see above). For example, [basics/simple](https://github.com/appcelerator/alloy/tree/master/test/apps/basics/simple) or [models/todo](https://github.com/appcelerator/alloy/tree/master/test/apps/models/todo). You can run these in a few different ways:
40
41### A) With a regular Alloy installation
42Beginning with Alloy 1.6, you can do the following:
43
44```bash
45# first, create a Titanium Classic project
46titanium create --name yourAppName
47cd yourAppName
48
49# then, convert it to an Alloy project, using the test app as a template
50alloy new . --testapp basics/simple
51```
52
53### B) By cloning the repo and using the Jake test runner
54
55```bash
56# first, clone the repo
57git clone https://github.com/appcelerator/alloy.git
58cd alloy
59
60# install jake globally
61[sudo] npm install -g jake
62
63# install alloy globally from the cloned repo
64[sudo] npm install -g .
65
66# install alloy's local testing dependencies
67npm install
68
69# run a test app
70jake app:run dir=basics/simple
71```
72
73### C) Importing the "Harness" to Titanium Studio
74
75You can use these apps through Titanium Studio too. The easiest way to do that would be to import the **test/project/Harness** into Titanium Studio. After that, everytime you run `jake`, your project in Studio will be updated. Once in Studio, you can run for any platform, Titanium SDK version, or change any settings you want. This will give you a lot more options and power than running solely from the command line.
76
77## Additional Notes on Jake
78
79* See the [jake readme](https://github.com/appcelerator/alloy/blob/master/jakelib/readme.md) for information on using `jake` including the arguments and flags it accepts.
80* on OSX or Linux
81 * Try using `sudo` with the `jake` command if you run into permission errors.
82* on Windows
83 * Don't run `jake` from within a user folder (i.e. `C:\Users\tony\alloy`), as you can get all kinds of non-obvious permissions failures from the child processing Alloy does. Your safest bet is to just `git clone` right to `C:\alloy`.
84 * Node.js has [an issue piping output between node processes on Windows](https://github.com/joyent/node/issues/3584). I've tried to [workaround](https://github.com/joyent/node/issues/3584#issuecomment-23064579) as best I can. You may still see errors pop up, so it's suggested that if you run the automated testing via `jake test:all` or `npm test`, you do so on a non-Windows OS to ensure there's no red herring failures until the aforementioned node.js issue is resolved.
85 * If you decide to ignore my advice and run the tests anyway on Windows, make sure that if you imported the Harness into TiStudio that you _don't_ have TiStudio running. Windows creates locks on key files in that project that are necessary for the testing process. It will make tests fail erroneously.
86 * If you're still that stubborn, are running the test suite on Windows, and you're getting those intermittent, erroneous errors, try running them one spec at a time. Instead of doing `jake test:all`, do `jake test:spec[SPEC_NAME]`, where `SPEC_NAME` is JS file in the [test specs folder](https://github.com/appcelerator/alloy/tree/master/test/specs).
87
88## Feedback
89
90More so than any other Appcelerator project to this point, we are working collaboratively with the community to develop a framework that works for you. Here's the best ways to discuss Alloy or ask questions.
91
92* Got an Alloy development question? Go to the Appcelerator [Q&A](http://developer.appcelerator.com/questions/newest), and make sure to use the **alloy** tag.
93* Want to discuss the past, present, and future of Alloy? Join the [Alloy Google group](https://groups.google.com/forum/?fromgroups#!forum/appc-ti-alloy).
94* Got a confirmed bug? Log it at the [Titanium Community Issue Tracker](https://jira.appcelerator.org/browse/TC). Make sure to give it the **alloy** label.
95
96Other than that, all the usual rules for submitting feedback apply. The more code, details, and test cases you provide, the easier it will be to act on that feedback.
97
98## Contributing
99
100Alloy is an open source project. Alloy wouldn't be where it is now without contributions by the community. Please consider forking Alloy to improve, enhance or fix issues. If you feel like the community will benefit from your fork, please open a pull request.
101
102To protect the interests of the Alloy contributors, Appcelerator, customers and end users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is simple and straightforward - it requires that the contributions you make to any Appcelerator open source project are properly licensed and that you have the legal authority to make those changes. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes only a few minutes, and only needs to be completed once.
103
104[You can digitally sign the CLA](http://bit.ly/app_cla) online. Please indicate your email address in your first pull request so that we can make sure that will locate your CLA. Once you've submitted it, you no longer need to send one for subsequent submissions.
105
106## Contributors
107
108```
109 project : alloy
110 repo age : 2 years, 4 months
111 active : 589 days
112 commits : 3168
113 files : 2687
114 authors :
115 2363 Tony Lukasavage 74.6%
116 312 Tim Poulsen 9.8%
117 106 Feon Sua 3.3%
118 87 Jeff Haynie 2.7%
119 75 Russ McMahon 2.4%
120 38 Kevin Whinnery 1.2%
121 36 Ben Hatfield 1.1%
122 32 Fokke Zandbergen 1.0%
123 21 Carl Orthlieb 0.7%
124 11 Paul Mietz Egli 0.3%
125 8 Issam Hakimi 0.3%
126 7 Chris Barber 0.2%
127 6 Praveen Innamuri 0.2%
128 6 Arthur Evans 0.2%
129 5 David Bankier 0.2%
130 5 Xavier Lacot 0.2%
131 4 Martin Tietz 0.1%
132 4 Joel Herron 0.1%
133 3 Ingo Muschenetz 0.1%
134 3 Federico 0.1%
135 2 Tim Statler 0.1%
136 2 Iain Dawson 0.1%
137 2 Bryan Hughes 0.1%
138 2 Marc Tamlyn 0.1%
139 2 miga 0.1%
140 2 Davide Cassenti 0.1%
141 2 Aaron Saunders 0.1%
142
143```
144
145## Legal
146
147Alloy is developed by Appcelerator and the community and is Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved.
148Alloy is made available under the Apache Public License, version 2. See the [LICENSE](https://github.com/appcelerator/alloy/blob/master/LICENSE) file for more information.