Server-component for the LiveViewer App.
It takes a target platform and source URL and returns a ZIP file of the (Alloy compiled) project.
- Subversion:
apt-get install subversion
git clone https://github.com/appcelerator/appc-liveviewer-server
cd appc-liveviewer-server
npm install
npm start
In production you'd probably use forever start index.js
or something like that.
Go to /
to be redirected to /fiddle
for a simple classic Titanium to JS-QR fiddle.
- Running instance: http://node.fokkezb.nl:8080/
Download (and compile Alloy) code via:
/compile?platform=ios&url=https://github.com/appcelerator/alloy/tree/master/samples/rss
- Running instance: http://node.fokkezb.nl:8080/compile?platform=ios&url=https://github.com/appcelerator/alloy/tree/master/samples/rss
An URL to get the Alloy or Classic source code from.
The server accepts the following URLs:
- GitHub repositories:
https://github.com/<user>/<repo>
https://github.com/<user>/<repo>/tree/<branch>
https://github.com/<user>/<repo>/tree/<branch>/<dir>
https://github.com/<user>/<repo>/blob/<master>/<file>
- GitHub gists URLs
https://gist.github.com/<user>/<gist>
https://gist.github.com/<user>/<gist>#file-<file>
- URLs to a classic JavaScript or Alloy view file
- URLs to a zip, tar, tar.bz2 or tar.gz file
- TODO: TiFiddle URLs (#12)
A directory must contain one of the following paths:
- To be detected as Classic project:
Resources/app.js
orResources/<platform>/app.js
app.js
or<platform>/app.js
- To be detected as Alloy project:
app/controllers/index.js
orapp/controllers/<platform>/index.js
controllers/index.js
orcontrollers/<platform>/index.js
app/views/index.xml
orapp/views/<platform>/index.xml
views/index.xml
orviews/<platform>/index.xml
A single file must either contain Ti.UI.*
(classic) or <Alloy>
(Alloy).
A string with one of:
ios
android
A string with one of:
production
(default)development
test
This param is only used for Alloy.
var engine = require('appc-liveviewer-server');
engine.auto('https://github.com/appcelerator/movies', 'ios', function(err, zip) {
// do something with the path to the zip file
// and don't forget to delete the zip file when you're done
});
See url under Run the server.
See platform under Run the server.
See deployType under Run the server.
Will be called with error as first argument and the path to the generated zip-file as the second. You should clean up the zip-file after you're done wit it.
See issues
This code is closed source and Confidential and Proprietary to Appcelerator, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Appcelerator. This file is licensed as part of the Appcelerator Platform and governed under the terms of the Appcelerator license agreement. Your right to use this software terminates when you terminate your Appcelerator subscription.