Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10757] CLI: Module Build

GitHub Issuen/a
TypeEpic
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-08-24T19:20:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0
ComponentsCLI
Labelsft, notable, planning-3.2.0
ReporterChris Barber
AssigneeFeon Sua Xin Miao
Created2012-09-04T14:48:48.000+0000
Updated2017-03-22T17:05:17.000+0000

Description

The task involves a few things before implementing the platform specific logic.

cli/commands/build.js

In the project-dir callback function, determine if the project is an app or a module. If the project has a tiapp.xml, then it is an app. If the project has a timodule.xml, it is a module. When a module project is found, the timodule.xml should be parsed and saved into the cli.timodule variable. If the the project is neither a app or module, error and exit. You should set the cli.argv.type to the appropriate value. Remember that you need to scan up the directory tree since the project-dir may be a subdirectory. In the validate() function, if it is an app, then do the ti.validateCorrectSDK() and ti.validatePlatform() stuff. If it is a module, then validate module stuff. In the run() function, I think you only need to call ti.resolvePlatform() for apps. The buildModule should be path.join(__dirname, '..', '..', platform, 'cli', 'commands', '_build.js') for apps and path.join(__dirname, '..', '..', platform, 'cli', 'commands', '_build_module.js') for modules. If _build_module.js file does not exist, error and exit.

node_modules/titanium-sdk/lib/builder.js

Add this.timodule = cli.timodule; to the run() function after the this.tiapp line.

Comments

  1. Ingo Muschenetz 2015-06-02

    iOS and Android are done. MobileWeb is on hold for the moment.
  2. Lee Morris 2017-03-22

    Closing ticket as fixed.

JSON Source