Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

creating a package in a local repository #53

Open
ianmcnally opened this issue Jul 24, 2012 · 2 comments
Open

creating a package in a local repository #53

ianmcnally opened this issue Jul 24, 2012 · 2 comments

Comments

@ianmcnally
Copy link

I'm attempting to create a local package (local being internal to my company). In my jam.json, I list the github url as:

  "repositories": [
      {
        "type": "git",
        "url": "https://github.[company].net/[username]/demo_jam.git"
      }
    ]

I noticed your bug about installing through jam.json, but I can't get it to work with jam install demojam.
I get the error :

installing from repositories demojam
Building version tree...
repositories checking "demojam"
Error: No package for 'demojam'
    at Object.dependencyError (/usr/local/lib/node_modules/jamjs/lib/tree.js:216:16)
    at Object.updateDep (/usr/local/lib/node_modules/jamjs/lib/tree.js:181:33)
    at Object.addDependency (/usr/local/lib/node_modules/jamjs/lib/tree.js:128:28)
    at /usr/local/lib/node_modules/jamjs/lib/tree.js:134:32
    at /usr/local/lib/node_modules/jamjs/lib/tree.js:177:20
    at /usr/local/lib/node_modules/jamjs/lib/repository.js:445:9
    at /usr/local/lib/node_modules/jamjs/node_modules/async/lib/async.js:94:25
    at /usr/local/lib/node_modules/jamjs/lib/repository.js:441:13
    at /usr/local/lib/node_modules/jamjs/lib/repository.js:203:9
    at IncomingMessage. (/usr/local/lib/node_modules/jamjs/lib/couchdb.js:248:25)
Failed

In the github repository, the structure looks like:

demo_jam
    > jam
        > demojam
            main.js
            package.json
    demojam.tar.gz

Where demojam.tar.gz is a jam packed version of the demojam folder within it. Further, demojam > package.json looks like this:

{
    "name": "demojam",
    "version": "1.0.0",
    "description": "It's a demo of Jam",
    "homepage": "https://github.[company].net/[username]/demo_jam",
    "main": "main.js"
}

I presume having both the tar and the directory (demojam with package.json and main.js) is one too many approaches. But either way, should this work?

@newtonianb
Copy link

I am also interested in this, no feedback?

@caolan
Copy link
Owner

caolan commented Nov 13, 2012

You can use github's downloads to install a tagged version of your package "jam install URL" where URL is pointing at a .tar.gz file with a package.json file. You can also install from a local directory "jam install /path/to/my-package". You can also run a private package repository using CouchDB. Just update ~/.jamrc to point to your company's private db.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants