Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.
[sudo] npm install -g supervisor
| #include "FastLED.h" | |
| #if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) | |
| #warning "Requires FastLED 3.1 or later; check github for latest code." | |
| #endif | |
| #define NUM_LEDS 100 | |
| #define LED_TYPE WS2811 | |
| #define COLOR_ORDER GRB |
| // app/lib/SVGProduct.js | |
| function getImageFileFromSVG(svgOpts, name) { | |
| var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationCacheDirectory, | |
| Ti.Utils.md5HexDigest(JSON.stringify(svgOpts))); | |
| if (!file.exists()) { | |
| var SVG = require('com.geraudbourdin.svgview'); | |
| if (!file.write(SVG.createView(svgOpts).toImage())) { | |
| Ti.API.error("Can't save to file. Product:", name); | |
| return null; |
| alias screenshot='adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "/Users/fokkezb/Downloads/android_$(date +%Y%m%d-%H%M%S).png"' | |
| # NOTE: Replace 'fokkezb' with your user. You cannot use ~ when using $() unfortunately |
Execute "tishadow run" in your Titanium app directory whenever a JavaScript file changes. Edit your JS files in a text editor, save, then switch to the test device or simulator. Profit.
[sudo] npm install -g supervisor
| // Copyright Stephen Feather and other contributors. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
| // Copyright Stephen Feather and other contributors. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
| //Wrapper class to create extensible Titanium components | |
| function Component(/*Object*/ tiView) { | |
| var self = { | |
| __viewProxy:tiView | |
| }; | |
| //passthrough for add | |
| self.add = function(/*Object*/ tiChildView) { | |
| var v = tiChildView.__viewProxy||tiChildView; | |
| self.__viewProxy.add(v); |
| var tracer = {}; | |
| (function() { | |
| tracer.levels = {}; | |
| tracer.levels.DEBUG = 1; | |
| tracer.levels.INFO = 2; | |
| tracer.levels.WARN = 3; | |
| tracer.levels.ERROR = 4; | |
| tracer.levels.OFF = 5; | |
| tracer.allTracers = []; |