{ "id": "92566", "key": "TIMOB-9317", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14064", "description": "Sprint 2012-17 Core", "name": "Sprint 2012-17 Core", "archived": true, "released": true, "releaseDate": "2012-08-27" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-16T15:11:06.000+0000", "created": "2012-05-30T15:31:24.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "30552", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "117839", "key": "TIMOB-14723", "fields": { "summary": "iOS: Unable to support multiple JS files per module", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-24T20:57:23.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Currently, iOS, Android and Mobile Web module projects will really only support runtime execution of code from just one Javascript file in the module project. In the case of mobileweb, it's src/modulename.js, and in the case of Android and iOS it's assets/moduleid.js. Though you can put as many JS files as you want in those folders (and they will be packaged and delivered), at runtime only the \"expected\" single module file is reachable (i.e., via require()).\r\n\r\nWe would like to support require()ing (or AMD'ing in the case of mobileweb) the other packaged js files as well. We should discuss what this looks like at runtime and what the expectations are, and come up with a test case. Then create sub-tasks per platform.\r\n\r\nMobileWeb will likely go forward quickly as their platform seems to be better suited for doing this. Android/iOS will need to grapple with runtime contexts, and getting this to work in native compiled code. In general it seems a hairier problem for Android/iOS.", "attachment": [], "flagged": false, "summary": "Module Projects: Support multiple Javascript files", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [ { "id": "92572", "key": "TIMOB-9318", "fields": { "summary": "MobileWeb: require() doesn't work within Ti+ modules", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "93177", "key": "TIMOB-9524", "fields": { "summary": "iOS: Support multiple JS files per module", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "93705", "key": "TIMOB-9730", "fields": { "summary": "Android: Support multiple JS files per module", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium 2.1.0", "comment": { "comments": [ { "id": "198396", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created subtask for iOS. According to mobileweb, {{require()}} for modules should work like {{node.js}} (of course) where for the library with ID {{module.id}}:\r\n\r\n* {{require('module.id')}} requires the \"main\" JS file (the JS file named 'module.id.js')\r\n* {{require('module.id/subpath/lib')}} requires the file 'lib.js' which is in the module's relative hierarchy './subpath'.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T16:04:02.000+0000", "updated": "2012-06-13T16:04:02.000+0000" }, { "id": "198400", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "ALSO, in a module file, it should be positioned 'relative' to the root of the module. So for example, the {{module.id.js}} file would be able to {{require(subpath/lib)}}.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T16:09:54.000+0000", "updated": "2012-06-13T16:09:54.000+0000" }, { "id": "198402", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "It's worth noting that the \"main\" JS file should be defined in a package.json file, however, it would work just standardizing on a convention that the main JS file shares the same name as the module.\r\n\r\nIf a module requires another module, it does not need to specify the \"module.id\". So if module.id.js needed to require module.id/subpath/lib.js, it could simply require(\"subpath/lib\") or require(\"./subpath/lib\") or require(\"/subpath/lib\"). All absolute module ids are rooted to the module's src directory.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-06-13T16:29:22.000+0000", "updated": "2012-06-13T16:29:22.000+0000" }, { "id": "214893", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "all child items resolved. Resolving...", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-16T15:11:06.000+0000", "updated": "2012-08-16T15:11:06.000+0000" }, { "id": "415764", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed with reference to previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T20:57:23.000+0000", "updated": "2017-03-24T20:57:23.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }