forked from miniman42/TiShadow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
61 lines (61 loc) · 14.3 KB
/
Copy pathpackage.json
File metadata and controls
61 lines (61 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"name": "tishadow",
"version": "2.3.33-carma",
"dependencies": {
"jade": ">= 0.0.1",
"socket.io": ">= 0.9.6",
"socket.io-client": ">=0.9.11",
"colors": ">=0.6.0-1",
"commander": "1.0.x",
"pkginfo": "0.2.3",
"jshint": "0.9.1",
"wrench": "1.4.x",
"underscore": "1.4.x",
"archiver": "0.4.8",
"express": "~3.3.4",
"lazystream": "~0.1.0",
"form-data": "~0.1.0",
"uglify-js": "~2.4.0",
"mocha": "~1.12.1",
"temp": ">=0.6.0",
"adm-zip": ">=0.4.4",
"tiapp": "~0.0.1",
"gaze": "~0.4.3",
"execSync": "~1.0.1-pre",
"node-zip": ">=1.1.0",
"archiver": ">=0.6.1"
},
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "0.8.x"
},
"author": {
"name": "David Bankier",
"email": "david@yydigital.com",
"url": "http://www.yydigital.com"
},
"description": "Quick Titanium previews across devices",
"repository": {
"type": "git",
"url": "git://github.com/miniman42/TiShadow.git"
},
"bin": {
"tishadow": "./cli/tishadow",
"ts": "./cli/tishadow"
},
"license": "Apache Public License v2",
"framework": "none",
"private": "true",
"main": "server/app.js",
"readme": "TiShadow\n========\n\nTiShadow provides Titanium developers the ability to deploy apps, run tests or execute code snippets live across all running iOS and Android devices.\n\nThere are three parts to TiShadow: the TiShadow server, TiShadow app and TiShadow CLI\nwhich are all need.\n\n~~Have a look at this [presentation](http://www.slideshare.net/londontitanium/titanium-london-tishadow-july-2012) (July 2012) given at the TiLondon meetup for a look at most of what you can do with TiShadow.~~ (Outdated)\n\nGo to the new [project website](http://tishadow.yydigital.com)\n\nJoin the discussion on the [Google Group](https://groups.google.com/forum/?fromgroups=#!forum/tishadow).\nYou can also find some TiShadow related blog posts\n[here](http://www.yydigital.com/blog)\n\n\nGetting Started\n===============\n\nTiShadow Install\n----------------\n\n### TiShadow NPM Package\n\nTiShadow is built on [node.js](http://nodejs.org/) and is required.\n\nTiShadow can be installed via npm using the following command:\n\n```\n sudo npm install -g tishadow\n```\n\nOr if you want to use the master version directly from GitHub:\n\n```\n sudo npm install -g git+ssh://git@github.com/dbankier/TiShadow.git\n```\n\n### TiShadow App\n\nTo create a new titanium project use the following command:\n\n```\n tishadow app -d [destination folder]\n```\n\ne.g.\n\n```\n mkdir ~/tishadowapp\n tishadow app -d ~/tishadowapp\n```\n\n**NOTE**: In general upgrade the server side and app at\nthe same time (using the `tishadow app` command).\n\nYou can upgrade an existing tishadow app using the `--upgrade` flag.\n\nStart the TiShadow Server\n---------------------\n\nThe server can be started by typing the following command:\n\n```\n tishadow server\n```\n\nThe following options are available:\n\n```\n -h, --help output usage information\n -p, --port <port> server port\n -l, --long-polling force long polling\n -i, --internal-ip <internal-ip> internal ip to bind to\n -s, --screenshot-path <screenshot-path> path to save screenshot (defaults to /tmp)\n -z, --manage-versions manage and automatically update bundles\n```\n\nIf `--manage-versions` is enabled, then bundle versions are tracked and\ndevices that connect with an older version will automatically be\nupdated. When using this mode, you can use the `tishadow deploy` command\nto send a new bundle to the server without pushing it to connected\ndevices.\n\n### Remote Server Mode and Private Rooms\n\nThe TiShadow Server supports remote hosting with configurable http\nports. It also allow for private \"rooms\" (much like chat rooms) so that\nthe TiShadow server can be shared. \n\nThe `tishadow log` command is\navailable to tail remote server logs (in the default or selected room).\n\nThe `tishadow config` command is available to set the default host, port\nand room for all the relevant command below.\n\n\nStart the TiShadow App\n----------------------\n\nOnce the server is running launch the app. For example, to launch the\napp in the iPhone simulator using the Titanium CLI:\n\n```\n cd ~/tishadowapp\n titanium build -p iphone\n```\n\nFrom the app just enter the ip address or hostname of the computer running the\nserver and hit connect. (There are also more advanced connection settings\nthat can be used for remote server connections.)\n\n\nWhat you can do with TiShadow\n=============================\n\nFull Application Deployment\n---------------------------\n\nGo to the root folder of your project and enter the following command to deploy an app:\n\n```\n tishadow run\n```\n\nIf the app has been deployed and you want to push minor updates, use the following command:\n\n```\n tishadow run --update\n```\n\nHere are full list of options:\n\n```\n -h, --help output usage information\n -u, --update Only send recently changed files\n -a, --patch patch updated files without causing app restart\n -l, --locale <locale> set the locale in in the TiShadow app\n -j, --jshint analyse code with JSHint\n -t, --tail-logs tail server logs on deploy\n -o, --host <host> server host name / ip address\n -p, --port <port> server port\n -r, --room <room> server room\n```\n\n\nThe app is then cached on the device. If need to clear the cache, use\nthe following command:\n\n```\n tishadow clear\n```\n\n__Some notes and limitations__\n\n * `Ti.include` is partially supported and will work if included with the full path \n i.e. slash leading.\n * Only files in the Resources directory will be sent to the device\n using TiShadow. That said, localisation files **are** supported. (see\n options above). \n * Native modules _can_ be supported if built into the TiShadow app\n first. (I.e., add them to the tiapp.xml of the TiShadow app.)\n * Custom fonts will be loaded if placed in the `Resources/fonts`\n directory for iOS only.\n * If there any errors about a Titanium SDK command not being found, add\n them to the Includes.js files and clean and build the TiShadow app. (I\n will gradually be adding commands.)\n * Any Ti.API logs will be redirected to the server logs and webpage.\n\n\nTesting / Assertions\n--------------------\n\nTiShadow supports [Jasmine](http://pivotal.github.com/jasmine/) BDD tests. \n(Insipration taken from these two projects: [titanium-jasmine](https://github.com/guilhermechapiewski/titanium-jasmine/) and [jasmine-titanium](https://github.com/akahigeg/jasmine-titanium))\n\nInclude your specs in the `spec` path of your project. Ensure\nthe files are ending in `_spec.js`. (Note: simply write the spec without any including/requiring the jasmine library.)\n\nTo execute the tests enter the following command:\n\n```bash\n tishadow spec\n```\n\nHere are a full list of options:\n\n```\n -h, --help output usage information\n -u, --update Only send recently changed files\n -l, --locale <locale> Set the locale in in the TiShadow app\n -o, --host <host> server host name / ip address\n -p, --port <port> server port\n -r, --room <room> server room\n -j, --jshint analyse code with JSHint\n -x, --junit-xml output report as JUnit XML\n```\n\nThe test results will be returned to the server/cli output:\n\n\nSee the included example project or this [blog post](http://www.yydigital.com/blog/2013/2/14/Testing_Alloy_With_Jasmine_And_TiShadow).\n\n\n_Alternatively (yet not preferred)_\n\nTiShadow also supports the use of assertions and the results are\nreturned either to the browser or server logs.\n \nFor example:\n\n```javascript\n assert.isNumber(6, \"Testing if 6 is a number\");\n assert.isArray([1,2,3,4], \"Testing if it is an array\");\n```\n\nThe following assertion are supported:\n'equal', 'strictEqual', 'deepEqual', 'isTrue', 'isFalse',\n'isEmpty', 'isElement', 'isArray','isObject', 'isArguments', 'isFunction',\n'isString', 'isNumber', 'isFinite', 'isBoolean', 'isDate', 'isRegExp', 'isNaN', 'isNull',\n'isUndefined', 'lengthOf', 'match', 'has'\n\nAlso the equivalent not assertions are available as well, e.g.\n'notEqual', 'isNotString', 'isNotNumber', etc.\n \n\nConfigurable Localisation\n-------------------------\nTiShadow supports dynamic localisation. You can also chose the locale \nyou wish to use when launching your app/tests. Simply add the\ntwo-letter language code to your command. For example:\n\n```\n tishadow run --locale es\n tishadow spec --locale nl\n```\n\nTiShadow REPL\n-------------\n\nThe TiShadow REPL is available and evaluates commands in a\npersistent sand-boxed context. \n\nTo Launch the REPL enter the following command:\n\n```bash\n tishadow repl\n```\nWith the following options: \n\n```\n -h, --help output usage information\n -o, --host <host> server host name / ip address\n -p, --port <port> server port\n -r, --room <room> server room\n```\n\n\n`launchApp(appName)`, `closeApp()` and `clearCache()` methods available\nto interact with apps cached in the TiShadow app.\n\n`require()`, `Ti.include()` and assets are relative the running app\ninside the TiShadow app.\n\n###Spies\n\nYou can add **spies** on objects so that you can modify them from\nthe repl at run time. In your code add the following command:\n`addSpy(name, object)`. This can be included as a comment, eg:\n`//addSpy(\"mywindow\",win)` which will be uncommented when pushed.\nTo get the object, simply use, e.g. `getSpy(\"mywindow\")` from the repl.\n\nFor Alloy, since comments are removed at compile time you can use the\nfollowing [alloy.jmk](https://gist.github.com/dbankier/5648950) to\nautomatically inject spies on the `$`object in your controllers, naming\nthe spy with the file's name. \n\nScreenshots\n-----------\n\nYou can capture screenshots of all connected devices using the following command: \n\n```\n $ tishadow screenshot\n```\n\nThe screenshots will be saved in `png` format in the `/tmp` directory or the path\nconfigured using the `--screenshot-path` flag when starting the server.\n\n###Screencast mode\n\nInstead of saving the screenshots you can stream them to the browser. Use the following command:\n\n```\n $ tishadow screenshot --screencast 1000 --scale 0.1\n```\n\nIn the above example a screenshot is sent every 1000ms and scales the images to 10% of their height/width.\nGo to: `http://localhost:3000/screencast` to view the screencast.\n\n\nCode Snippets Via Webpage\n-------------------------\n \nEnter the following address in a browser window:\n\n```\n http://localhost:3000/\n```\n\nIn the editor you can enter code and press Command+s to deploy the code\nsnippet to all connected devices. Have a look at the demo [video](http://www.youtube.com/watch?v=xUggUXQArUM).\n\nCoding from the webpage works much like the REPL and variables\nare stored in a sand-boxed context. See the next section.\n\n\nTiShadow Appify\n---------------\n\nThe `tishadow appify` command can be used to create a\nstand-alone app that is integrated with TiShadow. It automatically\nlaunches the contained tishadow bundle and connects to a pre-configured\nserver. The allows connecting to the deployed app via the repl and/or\npush upgrades.\n\n```\n Usage: appify [options]\n\n Options:\n\n -h, --help output usage information\n -d, --destination <path> target path for generated project\n -o, --host <host> set server host name / ip address\n -p, --port <port> set server port\n -r, --room <room> set server room\n```\n\nSee the following [blog post](http://www.yydigital.com/blog/2013/2/19/TiShadow_Appify).\n\n\nLaunch From Web\n---------------\n\n_Currently only working on iOS_\n\nYou can also use TiShadow to bundle an app and launch it from a web\npage. Use the command `tishadow bundle` to bundle the app for a\nTiShadow distribution. Then include a link to the bundle in your webpage\nusing the following format, e.g. : `tishadow://mydomain.com/bundle.zip`.\nTapping on the link from your browser should launch the app in TiShadow.\n\n\nVIM Shortcuts\n-------------\nThose using vim/gvim/mvim for development might want to add these\nshortcuts (or similar) to the .vimrc/.gvimrc files. It add the shortcuts, F6\nto save and do a tishadow update, and Shift+F6 to save and perform a full\ntishadow deploy:\n\n```\n :map <F6> <Esc>:w<CR>:!tishadow run --update<CR>a\n :imap <F6> <Esc>:w<CR>:!tishadow run --update<CR>a\n :map <S-F6> <Esc>:w<CR>:!tishadow run<CR>a\n :imap <S-F6> <Esc>:w<CR>:!tishadow run<CR>a \n```\n\n\nCredits\n=======\n\nThe server code uses the following and are included:\n\n * [node.js](http://nodejs.org/)\n * [express](http://expressjs.com/)\n * [socket.io](http://socket.io)\n * [Twitter Bootstrap](http://twitter.github.com/bootstrap/)\n * [Ace](https://github.com/ajaxorg/ace)\n\nThe app is built using [Appcelerator](http://www.appcelerator.com/)'s\nTitanium.\n\nThird Party Modules\n-------------------\n\n### Websockets/Socket.IO\n####iPhone/Android\nCopyright 2012 jordi domenech jordi@iamyellow.net Apache License, Version 2.0\n\n[Github Repo](https://github.com/iamyellow/tiws)\n\n\n### ZIP Modules\n####iPhone/Android\n\nNow using ti.compression:\n[titanium_modules](https://github.com/appcelerator/titanium_modules)\n\nContributors\n------------\n\n```\n project : TiShadow\n repo age : 1 year, 9 months\n active : 167 days\n commits : 373\n files : 194\n authors :\n 284 David Bankier 76.1%\n 42 dbankier 11.3%\n 35 Fokke Zandbergen 9.4%\n 2 noughts 0.5%\n 1 Luis Cruz 0.3%\n 1 Clément Blanco 0.3%\n 1 Timan Rebel 0.3%\n 1 astronaughts 0.3%\n 1 iskugor 0.3%\n 1 jsjant 0.3%\n 1 Pedro Palmero 0.3%\n 1 Hugh Cannon 0.3%\n 1 Ivan Skugor 0.3%\n 1 Jeff Bonnes 0.3%\n```\n\nFeedback appreciated.\n\n@davidbankier\n\n\n\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/miniman42/TiShadow/issues"
},
"_id": "tishadow@2.3.20-carma",
"dist": {
"shasum": "dcd7283c9d447c30a14a88af1e7d6c130ef7c952"
},
"_from": "tishadow"
}