User:Hashar/cli-js

''Not taking mostly. Do not quote me on this stuff!''

Install language interpreters python 2.7 and node.js. On a Mac OS X Computer, it will be with the port command (see MacPorts): $ sudo port install python2.7 $ sudo port install node # got me node 0.4.8

Then install "Node Package Manager" (npm) with a high risk of getting hacked in the way:

% Total   % Received % Xferd  Average Speed   Time    Time     Time  Current Dload Upload   Total   Spent    Left  Speed 100 3874  100  3874    0     0   8970      0 --:--:-- --:--:-- --:--:-- 13451 fetching: http://registry.npmjs.org/npm/-/npm-1.0.6.tgz /tmp/npm.50407/package 0.4.8 1.0.6 prefix=/opt/local
 * 1) curl http://npmjs.org/install.sh | sh

This script will find and eliminate any shims, symbolic links, and other cruft that was installed by npm 0.x.

Is this OK? enter 'yes' or 'no' yes

All clean! ! [ -d .git ] || git submodule update --init node cli.js cache clean node cli.js rm npm -g -f --loglevel error node cli.js install -g -f /opt/local/bin/npm -> /opt/local/lib/node_modules/npm/bin/npm.js node-uuid@1.1.0 /opt/local/lib/node_modules/npm/node_modules/node-uuid npm@1.0.6 /opt/local/lib/node_modules/npm It worked

Then install node-qunit ( https://github.com/kof/node-qunit ) using the node package manager:

$ sudo npm install qunit

> qunit@0.1.5 install ~/node_modules/qunit > make install

... output of ./configure && make && make install

argsparser@0.0.5 ./node_modules/qunit/node_modules/argsparser uglify-js@1.0.2 ./node_modules/qunit/node_modules/sharedjs/node_modules/uglify-js sharedjs@0.0.2 ./node_modules/qunit/node_modules/sharedjs qunit@0.1.5 ./node_modules/qunit

You should have something like:

$ sudo npm list /path/to/home └─┬ qunit@0.1.5 ├── argsparser@0.0.5 └─┬ sharedjs@0.0.2 └── uglify-js@1.0.2 $

NPM actually install the requested modules under /path/to/home/node_modules/ and then use a symbolic link to publish the binary. The folder can be found by using :

$ npm bin /path/to/home/node_modules/.bin $

You might want to append that binary path to your PATH environnement variable: NODE_PATH="/Users/hashar/node_modules" export PATH=$PATH:"$NODE_PATH/.bin"
 * 1) node.js

At this step, you should be ready to run qunit :

$ which qunit /path/to/home/node_modules/.bin/qunit $ qunit -h

Usage: cli [options] value (boolean value can be used)

...