{ "id": "127606", "key": "TIMOB-16620", "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": "15939", "description": "2014 Sprint 07", "name": "2014 Sprint 07", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15942", "description": "2014 Sprint 07 Tooling", "name": "2014 Sprint 07 Tooling", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "16098", "description": "2014 Sprint 09 Tooling", "name": "2014 Sprint 09 Tooling", "archived": true, "released": true, "releaseDate": "2014-05-08" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-09T17:48:39.000+0000", "created": "2014-03-12T23:42:29.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-05-30T18:09:51.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "Currently custom templates can be built and placed in the templates folder in the root of each installed SDK.\r\n\r\nWould like to have an entry called *paths.templates* added to the *config.json* that could be searched for custom templates (and possibly overwrite/overrule those located in the {sdk}/templates folder) when creating a new project.\r\n\r\nThis would allow large enterprise orgs to:\r\n\r\n# share common project templates across development environments\r\n# reduce the time to adopt a new sdk (currently requires moving custom templates to the new sdk on all systems)\r\n# reduce required storage space caused by duplication\r\n", "attachment": [ { "id": "47013", "filename": "foo.zip", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-04-01T21:03:08.000+0000", "size": 3135604, "mimeType": "application/zip" } ], "flagged": false, "summary": "CLI: Add configurable source for new project templates", "creator": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "environment": "All supported development platforms", "comment": { "comments": [ { "id": "298989", "author": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Praveen Innamuri should know about this and see if there's a way for Studio to use these CLI functions (TISTUD-6260)", "updateAuthor": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-27T16:48:33.000+0000", "updated": "2014-03-27T16:50:38.000+0000" }, { "id": "299554", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Titanium CLI master pull request: https://github.com/appcelerator/titanium/pull/125\n\nTitanium Mobile master pull request: https://github.com/appcelerator/titanium_mobile/pull/5569", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-04-01T21:02:46.000+0000", "updated": "2014-04-01T21:02:46.000+0000" }, { "id": "299558", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "There are a number of new ways to specify templates!\r\n\r\nh4. Default template\r\n\r\nThis will use the default template that comes with Titanium Mobile. It basically looks in the SDK's \"templates/app\" folder.\r\n\r\n{code}\r\nti create\r\n\r\n# -or-\r\n\r\nti create --template default\r\n{code}\r\n\r\nh4. Global template directory\r\n\r\nNow \"ti create\" will also scan all Titanium install locations for a \"templates\" directory containing the template you specified:\r\n\r\n{code}\r\n/Users/chris/Library/Application Support/Titanium/templates/mytemplate\r\n{code}\r\n\r\n{code}\r\nti create --template mytemplate\r\n{code}\r\n\r\nh4. Custom template paths\r\n\r\nYou can add more search paths via the {{paths.templates}} config option. You set this value to the path containing the templates.\r\n\r\nIn this example, {{/path/to/mytemplates}} contains a template called \"foo\".\r\n\r\n{code}\r\nti config paths.templates /path/to/mytemplates\r\n{code}\r\n\r\n{code}\r\nti create --template foo\r\n{code}\r\n\r\nh4. Local directory\r\n\r\n{code}\r\nti create --template /path/to/mytemplates/foo\r\n{code}\r\n\r\nh4. Local zip file\r\n\r\n{code}\r\nti create --template /path/to/myfootemplate.zip\r\n{code}\r\n\r\nh4. Remote zip file\r\n\r\n{code}\r\nti create --template http://www.chrisrocks.com/myfootemplate.zip\r\n{code}\r\n\r\nh4. New Template Structure\r\n\r\nTemplates now have a different file structure. You should have a \"templates\" directory containing all the files that will be automatically copied. You may have a \"hooks\" folder as well containing a Titanium CLI hook that allows you to tie into one of the several available hooks. Any other directory is ignored, so you could drop a package.json, readme, node_modules, whatever in the template directory.\r\n\r\n{code}\r\n├─┬ hooks