{"id":13749601,"url":"https://github.com/navinpeiris/jsca2js","last_synced_at":"2025-04-13T15:26:20.440Z","repository":{"id":151660753,"uuid":"2590018","full_name":"navinpeiris/jsca2js","owner":"navinpeiris","description":"Utility to convert JSON in Appcelerator's JSCA format to JavaScript","archived":false,"fork":false,"pushed_at":"2015-05-21T21:33:54.000Z","size":2465,"stargazers_count":74,"open_issues_count":5,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-27T06:22:32.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navinpeiris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-17T06:38:10.000Z","updated_at":"2023-08-31T18:56:59.000Z","dependencies_parsed_at":"2023-04-07T00:27:17.573Z","dependency_job_id":null,"html_url":"https://github.com/navinpeiris/jsca2js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navinpeiris%2Fjsca2js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navinpeiris%2Fjsca2js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navinpeiris%2Fjsca2js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navinpeiris%2Fjsca2js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navinpeiris","download_url":"https://codeload.github.com/navinpeiris/jsca2js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248734284,"owners_count":21153189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T07:01:07.409Z","updated_at":"2025-04-13T15:26:20.406Z","avatar_url":"https://github.com/navinpeiris.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"jsca2js\n=======\n\nThis project provides a set of utilities to convert APIs written in [Appcelerator's](http://www.appcelerator.com/) \n[JSCA](http://wiki.appcelerator.org/display/tis/JSCA+1.0+Specification) specification to JSDoc annotated \nJavaScript files.\n\nA good use case for these utilities is to generate a JavaScript file for the \n[Titanium JSON API](http://developer.appcelerator.com/apidoc/mobile/1.8.0.1/api.json), which can then be used in \nIDE's such as [IntelliJ IDEA](http://www.jetbrains.com/idea/), [NetBeans](http://www.netbeans.com/) or [Sublime Text 2](http://www.sublimetext.com/) \n(using [SublimeCodeIntel plugin](https://github.com/Kronuz/SublimeCodeIntel)) for code completion and documentation \nlookup.\n\nIf you drop this Javascript API in the root of your Titanium mobile project,\nsmart JS editors' code completion will help you write this kind of stuff easily:\n\n    var win = Ti.UI.createWindow(options);\n    win.\u003ccompletion for Window proxy object\u003e\n\nAlso, this project tries to find Alloy framework JSCA files and convert them too.\n\nConverting JSCA JSON to JavaScript\n----------------------------------\n\nThe main function used to convert JSCA JSON to JavaScript is named `convertJsca2Js` and is provided through \nthe `jsca2js.py` script. This function expects a JSON object containing the API in the JSCA specification \nand produces a string containing the converted JavaScript.\n\nCreating the Titanium JavaScript file\n-------------------------------------\n\nThe `titanium-mobile.py` script can be used to create a JavaScript file for Titanium Mobile API. This script \nwill automatically fetch the `api.json` file from the Titanium Developer site (and cache it locally) and produce \nthe corresponding JavaScript file.\n\n### Usage:\n\n    titanium-mobile.py \u003ctitanium-version\u003e (optional)\u003calloy-titanium-version\u003e\n\n### Output\n\nThe script will produce the JavaScript file in the current directory with a name that follows the following format:\n\n    titanium-mobile-\u003ctitanium-version\u003e.js\n\nIf the script would find Alloy JSCA file too, it will produce one more file with a name:\n\n\ttitanium-mobile-alloy-\u003ctitanium-version\u003e.js\n\n### PS\n\nBe aware that versions of Titanium and Alloy framework can be different. Check firstly [Appcelerator Portal](http://docs.appcelerator.com/titanium/latest/) in JSON SDK \nsection to find the proper latest version of Alloy framework. The titanium version for alloy is in the URL for the alloy file (eg. the 1.3.x alloy json is at version 3.2.0 of titanium).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavinpeiris%2Fjsca2js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavinpeiris%2Fjsca2js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavinpeiris%2Fjsca2js/lists"}