{"id":13749670,"url":"https://github.com/smclab/titaniumifier","last_synced_at":"2025-10-07T08:32:42.659Z","repository":{"id":13772876,"uuid":"16467843","full_name":"smclab/titaniumifier","owner":"smclab","description":"Get a Titanium™ SDK CommonJS module out of a Node package!","archived":false,"fork":false,"pushed_at":"2022-01-25T21:14:59.000Z","size":249,"stargazers_count":95,"open_issues_count":3,"forks_count":15,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-14T12:30:22.808Z","etag":null,"topics":["browserify","commonjs","node-js","titanium-sdk","titaniumifier"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smclab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-03T01:50:19.000Z","updated_at":"2022-01-26T00:35:46.000Z","dependencies_parsed_at":"2022-09-15T23:00:22.982Z","dependency_job_id":null,"html_url":"https://github.com/smclab/titaniumifier","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smclab%2Ftitaniumifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smclab%2Ftitaniumifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smclab%2Ftitaniumifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smclab%2Ftitaniumifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smclab","download_url":"https://codeload.github.com/smclab/titaniumifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235607124,"owners_count":19017302,"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":["browserify","commonjs","node-js","titanium-sdk","titaniumifier"],"created_at":"2024-08-03T07:01:09.368Z","updated_at":"2025-10-07T08:32:37.341Z","avatar_url":"https://github.com/smclab.png","language":"JavaScript","readme":"Titaniumifier\n=============\n\n\u003cimg align=\"right\" width=\"128\" height=\"128\" src=\"https://dl.dropboxusercontent.com/s/6xrfo94wzv37uk4/logo.svg\"\u003e\n\n[![Build Status](https://img.shields.io/travis/smclab/titaniumifier.svg?style=flat-square)](https://travis-ci.org/smclab/titaniumifier)\n[![npm](https://img.shields.io/npm/v/titaniumifier.svg?style=flat-square)](https://www.npmjs.com/package/titaniumifier) [![Gitter](https://img.shields.io/badge/GITTER-Join%20chat%20%E2%86%92-1DCE73.svg?style=flat-square)](https://gitter.im/smclab/titaniumifier?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nBuild your **Titanium CommonJS Modules** as they should be: as **CommonJS packages**, allowing more than one file.\n\nDeveloped around [substack][ss]’s [browserify][b], *titaniumifier* is a tool that can be used to build a zip file following Titanium SDK conventions with a `package.json` as its starting point.\n\n[Documentation][wiki]\n---------------------\n\nThe [Titaniumifier Wiki][wiki] is where you’ll find the most up to date documentation.\n\n\nInstallation and usage\n----------------------\n\nIf you’re serious with it you can use the [**Grunt plugin**][gt].\n\nIf you just want to test it out you can use the `titaniumifier` CLI (good for **quick tests**):\n\n    # install it globally\n    $ [sudo] npm install --global titaniumifier\n\n    # move into a node package\n    $ cd path/to/project\n\n    # this will build dist/NAME-commonjs.VERSION.zip\n    $ titaniumifier --out dist\n\n[wiki]: https://github.com/smclab/titaniumifier/wiki\n[ss]: https://github.com/substack\n[b]: https://github.com/substack/node-browserify\n[gt]: https://github.com/smclab/grunt-titaniumifier\n[ti-superagent]: https://github.com/smclab/ti-superagent\n\n- - -\n\n\nWhat is it for?\n---------------\n\nYou’ll want to give `titaniumifier` a try if you want to write\n\n- a Titanium CommonJS distributable module\n  - more complex than a single file,\n  - some `npm` dependencies;\n- a package that works on both Node.js and Titanium SDK;\n- a wrapper for an existing package existing on `npm`.\n\nOnce you’re done writing your package you’ll be able to publish it on `npm` for users to\n\n- use it with Node.js;\n- include it as a dependency of a *titaniumified* package.\n\n\nWhat is it **not** for?\n-----------------------\n\nEven with `titaniumifier` you still wont be ablo to\n\n- use or depend on ‘complex’ e ‘deeply node-ish’ packages like `socket.io` without work;\n- install Node.js packages in your app using `npm install ...`;\n\n\nTODO\n----\n\n- Make the built module easily debuggable from Titanium Studio (this is pretty big;)\n- Document and explore transpilation (this is a research mostly related to source maps/debug features;)\n- Make titaniumified repositories crawlable from `gitTio`;\n- Shim the following globals\n  - `Buffer` with `Titanium.Buffer`\n  - `TypedArrays`,\n  - `set/clearImmediate`,\n  - `process.nextTick`;\n- Shim the following built-ins\n  - `http`,\n  - `net` (with `Titanium.Network.TCPSocket`),\n  - `stream` (and make `fs` work with it.)\n\nThe shimming process could be a community effort into the development of `ti-http`, `ti-net` etc. Contact us if you’re interested in working on it. In case don’t limit yourself to pure JS, give native development a chance.\n\n\nCompatibility\n-------------\n\n### Titanium SDK\n\nThe reference packages have been tested extensively from Titanium SDK 3.2 onward. There should be no reson for titaniumified packages to not work on older SDK versions.\n\nIssues with Titanium SDK 3.x will be considered critical. With older versions we’ll try to do our best.\n\nBecause it does not mangle your `Resources` folder it is compatible with Alloy and TiShadow (and similars.) Please report any issue you have.\n\n### Node.js (in packages)\n\nCurrently Node.js 0.10 environment is shimmed in the packaging process. Once Node.js 0.12 is out there will be some interesting challenge to cope with (generators, WeakMap etc.)\n\nOnce that happens we’ll shim whatever is necessary.\n\n### Node.js (build-time)\n\nThis code is tested against Node.js 0.10 and 0.11.\n\n\nPlease steal this code (aka *examples*)\n---------------------------------------\n\nAt the moment, you’ll use `titaniumifier` through its `grunt` plugin, [`grunt-titaniumifier`][grtt].\n\nThere are 2 reference packages at the moment:\n\n- [`ti-superagent`][tisa] Which wraps @visionmedia’s `superagent`\n- [`liferay-connector`][lc] Which is a connector for our Portal Framework of choice, Liferay\n\n[grtt]: https://github.com/smclab/grunt-titaniumifier\n[tisa]: https://github.com/smclab/ti-superagent\n[lc]: https://github.com/smclab/liferay-connector\n\n\nContributing and whishlist\n--------------------------\n\nIf you feel like helping, we’ll accept pull requests with great joy.\n\nHere are a few ideas to help this project:\n\n- A Gulp plugin (here’s a [link to get you started][gp])\n- Even more unit-tests (**yes please!**)\n\n[gp]: https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/README.md\n\n\nWe love feedback\n----------------\n\n**Please**, don’t be afraid in opening new issues, even just for asking some help.\n\n\nCredits\n-------\n\nHumbly made by the spry ladies and gents at SMC.\n\n\nLicense\n-------\n\nThis library, *titaniumifier*, is free software (\"Licensed Software\"); you can\nredistribute it and/or modify it under the terms of the [GNU Lesser General\nPublic License](http://www.gnu.org/licenses/lgpl-2.1.html) as published by the\nFree Software Foundation; either version 2.1 of the License, or (at your\noption) any later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY,\nNONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General\nPublic License for more details.\n\nYou should have received a copy of the [GNU Lesser General Public\nLicense](http://www.gnu.org/licenses/lgpl-2.1.html) along with this library; if\nnot, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth\nFloor, Boston, MA 02110-1301 USA\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmclab%2Ftitaniumifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmclab%2Ftitaniumifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmclab%2Ftitaniumifier/lists"}