the only thing a global install does is to make the executables available 
in the PATH, which i found usually not needed, if you set up the scripts 
hash right.

Am Freitag, 11. Oktober 2013 01:14:58 UTC+2 schrieb greelgorke:
>
> what you want to do is this:
>
> 1. go to the folder whare your testing suite is place
> 2. put the package.json there. If you dont have one, do npm init here
> 3. edit your package.json and add all dependencies you need to the 
> dependencies hash
> 4. npm install (optionally you could npm install --save all your deps, 
> that would make step 3 obsolete)
> npm installs all the dependecies in dirWherePackageJsonIs/node_modules. 
> now you can shrinkwrap.
>
> 5. add a scripts hash to your package.json (see 
> http://karma-runner.github.io/0.10/intro/installation.html last paragraph)
> could be like 
> "scripts":{
>   "test":"node_modules/.bin/karma",
>   "foo": "noce_modules/.bin/foo bar.js"
> }
>
> when a fellow dev checks out this package, runs npm install in it, he/she 
> can the just run the scripts with npm run-script foo or just npm test. npm 
> symlinks cli binaries and scripts exposed by your dependencies into 
> node_modules/.bin/ so you can allways access the cli tools from the local 
> path. practicaly you never need a global install.
>
> Am Montag, 7. Oktober 2013 20:32:38 UTC+2 schrieb David Karr:
>>
>> I've prototyped a javascript unit testing infrastructure using Karma 
>> under npm.  I created a package.json file, but I don't understand what I'm 
>> supposed to do with this file. I've seen lots of documentation on how to 
>> create this, but the explanations of what it's used for seem to be 
>> incomplete.
>>
>> What I would HOPE I can do with it is store it in source control for my 
>> project, and when I set up this build on another host, it will somehow read 
>> the package.json file and install the expected versions of all the packages 
>> I'm using.  Is this a common and reasonable thing to do?  If so, how do I 
>> make this happen?
>>
>

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to