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 |
|
10 | Alloy 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_Framework) 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 sample apps](https://github.com/tidev/alloy/tree/master/samples/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/tidev/alloy.git
|
31 | ```
|
32 |
|
33 | ### from Axway Appcelerator Studio
|
34 |
|
35 | ...oh yeah, Studio will do it for you automatically. :)
|
36 |
|
37 | ## Running Sample Test Apps
|
38 |
|
39 | Alloy includes many sample and test apps in the **sample/apps** folder (see above). For example, [basics/simple](https://github.com/tidev/alloy/tree/master/samples/apps/basics/simple). You can run these in a few different ways:
|
40 |
|
41 | ### A) With a regular Alloy installation
|
42 | Beginning with Alloy 1.6, you can do the following:
|
43 |
|
44 | ```bash
|
45 | # first, create a Titanium Classic project
|
46 | titanium create --name yourAppName
|
47 | cd yourAppName
|
48 |
|
49 | # then, convert it to an Alloy project, using the test app as a template
|
50 | alloy 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
|
57 | git clone https://github.com/tidev/alloy.git
|
58 | cd 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
|
67 | npm install
|
68 |
|
69 | # run a test app
|
70 | jake app:run dir=basics/simple
|
71 | ```
|
72 |
|
73 | ### C) Importing the "Harness" to Titanium Studio
|
74 |
|
75 | You 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/tidev/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/tidev/alloy/tree/master/test/specs).
|
87 |
|
88 | ## Contributing
|
89 |
|
90 | Interested in contributing? There are several ways you can help contribute to this project.
|
91 |
|
92 | ### New Features, Improvements, Bug Fixes, & Documentation
|
93 |
|
94 | Source code contributions are always welcome! Before we can accept your pull request, you must sign a Contributor License Agreement (CLA). Please visit https://tidev.io/contribute for more information.
|
95 |
|
96 | ### Donations
|
97 |
|
98 | Please consider supporting this project by making a charitable [donation](https://tidev.io/donate). The money you donate goes to compensate the skilled engineeers and maintainers that keep this project going.
|
99 |
|
100 | ### Code of Conduct
|
101 |
|
102 | TiDev wants to provide a safe and welcoming community for everyone to participate. Please see our [Code of Conduct](https://tidev.io/code-of-conduct) that applies to all contributors.
|
103 |
|
104 | ## Security
|
105 |
|
106 | If you find a security related issue, please send an email to [security@tidev.io](mailto:security@tidev.io) instead of publicly creating a ticket.
|
107 |
|
108 | ## Stay Connected
|
109 |
|
110 | For the latest information, please find us on Twitter: [Titanium SDK](https://twitter.com/titaniumsdk) and [TiDev](https://twitter.com/tidevio).
|
111 |
|
112 | Join our growing Slack community by visiting https://slack.tidev.io
|
113 |
|
114 | ## Legal
|
115 |
|
116 | Titanium is a registered trademark of TiDev Inc. All Titanium trademark and patent rights were transferred and assigned to TiDev Inc. on 4/7/2022. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at https://tidev.io/legal.
|