[TIMOB-18079] CLI: Refactor build commands for greater code reuse
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-01-09T19:38:35.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 4.0.0 |
| Components | Android, CLI, iOS, MobileWeb, Tooling |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Christopher Williams |
| Created | 2014-11-24T17:10:21.000+0000 |
| Updated | 2017-03-16T22:42:23.000+0000 |
Description
Each platform's build command extends a Builder base class. We need to move common functions into the Builder so that we can reuse code across the build commands.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/6383 To test, 1) run "ti info" 2) build an Android, iOS, and Mobile Web app (simulator/emulator builds are fine)
Merged.
If a module is missing, the code starting at https://github.com/appcelerator/titanium_mobile/blame/master/node_modules/titanium-sdk/lib/builder.js#L184 is called. The references to
loggerand\_\_are invalid though so the script throws an error. It should bethis.loggerand the\_\_lib needs to be included in the module.[WARN] Could not find a valid Titanium module id=ti.map version=latest platform=windows deploy-type=development C:\Users\Tim\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185 throw e; ^ ReferenceError: logger is not defined at WindowsBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150108110929\node_modules\titanium-sdk\lib\builder.j at detect.callback (C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150108110929\node_modules\node-appc\lib\timodule.js:386:52) at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150108110929\node_modules\node-appc\lib\timodule.js:170:51 at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150108110929\node_modules\node-appc\node_modules\async\lib\async.js:592:17 at done (C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150108110929\node_modules\node-appc\node_modules\async\lib\async.js:135:19https://github.com/appcelerator/titanium_mobile/pull/6557
Closing ticket as fixed.