Titanium package manager consuming git repositories
npm install tipm
|10||downloads in the last month|
|Version||0.1.4 last updated a year ago|
|Keywords||titanium, tipm, package, client, ios, android, module|
|Dependencies (10)||term-css, commander, mkdirp, superagent, component-builder, string-to-js, jog, batch, win-spawn, debug|
Titanium package manager.
$ npm install -g tipm
To install one or more packages, simply pass their github
repo names as arguments to
tipm install. Dependencies
are resolved and the tipm module contents are downloaded into your
module/commonjs/ directory by default. View
tipm help install for details.
$ tipm install tipm/superagent install : tipm/superagent@master dep : email@example.com install : firstname.lastname@example.org fetch : tipm/monglo:tipm-monglo.js fetch : tipm/monglo:fs-store.js fetch : tipm/events:tipm-events.js complete : tipm/superagent complete : tipm/events
Searching for module
By adding your tipm module to the TIPM List wiki page it will become automatically available to
tipm-search(1). When invoked with no query all tipm modules are displayed, otherwise a filtered search, ordered by the number of github "stars":
$ tipm search ui tipm/dialog url: https://github.com/tipm/dialog desc: Dialog module ★ 12 tipm/notification url: https://github.com/tipm/notification desc: Notification module ★ 10 tipm/overlay url: https://github.com/tipm/overlay desc: Overlay module ★ 7
Usage: tipm <command> [options] Options: -h, --help output usage information -V, --version output the version number Commands: install <name ...> install one or more tipm modules create <dir> create a module skeleton search [query] search with the given query info <name> [prop] output json module information changes <name> output changelog contents docs <name> output readme contents open <name> open module github repo build build the module ls list installed tipm modules
- write modular commonjs modules
- write modules that include their own styles, images, scripts, or any combo
- no registry publishing or account required, uses github repositories
- extensible sub-commands via
- module skeleton creation command
- installs dependencies from the command-line or ./package.json
- avoid name squatting through github's naming conventions
- build your module with
--standaloneto share them with non-tipm(1) users
- view documentation from the command line
- simple private registry set up (all you need is a file server)
- very fast
Using Github as a registry
By using GitHub as the registry,
tipm(1) is automatically
available to you without further explicit knowledge or work
creating a registry account etc.
A nice side-effect of this namespaced world is that dependencies are explicit and self-documenting. No longer do you need to query the registry for a "repo" property that may not exist, it's simply built in to the package name, for example "visionmedia/page.js" rather than the unclear "page".
Another benefit of this is that there are zero name collisions, for example you may use "tipm/tip" for a dependency of "foo", and "someuser/tip" as a dependency of "bar", providing namespaced module names. This prevents obscure or irrelevant naming such as "progress", "progress2", "progress-bar", "progress-module" found in npm.
Creating a tipm Module
tipm-create(1) command can create a module
project skeleton for you by filling out the prompts. Once
this repo is published to Github, you're all done! Note
when publishing only publish the files inside the modules version
folder. ex. ./tipm-superagent/0.9.6/
$ tipm create tester repo (username/project): tipm/tester description: Some example module version:(0.0.1) 0.1.0 author name: Christian Sullivan license type:(MIT) MIT minimum Ti SDK version: 2.1.0 create : tester/0.1.0 create : tester/0.1.0/index.js create : tester/0.1.0/Readme.md create : tester/0.1.0/.gitignore create : tester/0.1.0/package.json
The Titanium commonjs manifest file is automatically generated by
when installing the module. So there is no need to publish this to your git
repo or manually create. If you wish to create your own just include
in the files array of your
package.json and it will override the generated manifest
Developing tipm(1) sub-commands
tipm(1) and sub-commands are structured much like
in that sub-commands are simply separate executables. For example
$ tipm info pkg and
$ tipm-info pkg are equivalent.
Because of this you'll likely want
PATH="./bin:$PATH" in your
profile or session while developing tipm, otherwise
will have a hard time finding the sub-commands.
Make sure dependencies are installed:
$ npm install
$ make test
- Compile native modules
- Integrate view templates (ax-view)
- Integrate stylesheet templates (ax-style)
The concept of tipm themselves are nothing new, Drupal for example has been doing this for years, however it seemed the concept was never really translated to the client. My hope is that other communities will re-implement this simple tool in their language of choice so that we can all consume components easily.
- TJ Holowaychuk
- Guillermo Rauch
- Garrett Johnson
- Amir Abu Shareb
- Adam Sanderson
- Matt Mueller
- Forbes Lindesay
- Arpad Borsos
- Dan Williams
(The MIT License)
Copyright (c) 2012 Christian Sullivan <email@example.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.