Difference between revisions of "Cane"
From IokeWiki
(New page: = Cane = Cane is a library/application packaging and sharing system. == Implementation Ideas == First iteration - for sharing libraries between early adopters only. Let's start assume...) |
m (→Implementation Ideas) |
||
Line 15: | Line 15: | ||
* when directory is found cane adds it to load path and explicitly use()s library init.ik file | * when directory is found cane adds it to load path and explicitly use()s library init.ik file | ||
* init.ik file may add directories from library to load path | * init.ik file may add directories from library to load path | ||
− | |||
From library developer's perspective this means that creating new library is as simple as: | From library developer's perspective this means that creating new library is as simple as: |
Revision as of 12:11, 18 March 2009
Cane
Cane is a library/application packaging and sharing system.
Implementation Ideas
First iteration - for sharing libraries between early adopters only.
Let's start assume that Ioke and Ioke-related libraries live in the same directory on developer's desktop, be it ~/projects or ~/Projects/IokeRelated.
Implementation:
- Ioke should provide method to add load paths (addLoadPath) to current runtime (absolute or relative to file from which was called)
- Ioke should provide method called cane that accepts name of library
- when cane() is invoked it tries to find directory with name of library in starting with parent directory and going up
- when directory is found cane adds it to load path and explicitly use()s library init.ik file
- init.ik file may add directories from library to load path
From library developer's perspective this means that creating new library is as simple as:
- creating new directory parallel to Ioke checkout
- adding library files in structure they like
- adding init.ik to specify which directories make the library
From library user's perspective using library means:
- checking out source code in parallel to Ioke directory (and project's directory as well)
- adding cane('library_name') to main file
- use()ing any needed files from library