here, I'm looking at: 
     http://wiki.commonjs.org/wiki/Packages/1.1 

Specifically - search for "directories", and you'll end up with the 
following findings in the texts, all of them under the section
Package Descriptor File 


   - directories.lib - directory of modules to be loaded under the packages 
   namespace. *require(name/subfilename)* must return modules from this 
   directory. Definition must be relative to the package description file. 


   - directories - Object hash of package directories. Typical directories 
   include "lib", "src", "doc", "jars", "test" and "bin". Package manager 
   tools must use these directory definitions to find various package 
   components.




And from that I learn that I should be able to create a package from which 
I should be able to require("mypackage/somemodule")
Did anybody here did it before?



Here's what I try:

{
  "name": "common-core",
  "version": "0.0.1",
  "description": "common tools - wrappers for logger and crypto, a 
config-base util and more",
  "main": "index.js",
  "directories.lib": "lib",
  "directories": {
    "test": "test",
    "lib" : "lib"
  },
  "scripts": {
    "test": "node node_modules/vows/bin/vows --spec"
  },
  "repository": "hg+http://private-lan:2782/common-core";,
  "license": "none",
  "dependencies": {
    "log4js": "0.5.*",
    "crypto": "0.0.3",
    "underscore": "~1.3.3",
    "validator": "~0.4.10"
  },
  "devDependencies": {
    "vows": "*"
  }
}

Classic Folder structure 

/common-core
  /lib
     config.js
     logger.js
     enc.js
     minimo.js
     ...and more 
  /test
     ... all test files
 package.json
 index.js
 README.md

There just have to be a way to do it...

On Friday, August 17, 2012 5:42:57 PM UTC+3, Osher E wrote:
>
> here, I'm looking at:
>
> http://wiki.commonjs.org/wiki/Packages/1.1 
>
> Specifically - search for "directories", and you'll end up with these 
> texts:
>
>
>    - directories.lib - directory of modules to be loaded under the 
>    packages namespace. *require(name/subfilename)* must return modules 
>    from this directory. Definition must be relative to the package 
> description 
>    file. 
>
>
>    - directories - Object hash of package directories. Typical 
>    directories include "lib", "src", "doc", "jars", "test" and "bin". Package 
>    manager tools must use these directory definitions to find various package 
>    components.
>
>
>
> And from that I learn that I should be able to create a package from which 
> I should be able to require("mypackage/somemodule")
> Did anybody here did it before?
>
>
>>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to