Node v0.4.9 came out a couple of days ago, and when I went to tinker with it this morning, I bumped up against the ".jsan packaging" issue again.
What I mean, more specifically, is that I'm using Tim Caswell's
nvm which when I ask it to install a new version of node automatically installs the most recent stable version of npm along with it (quite convenient). But when I run, say:
$ npm install task-joose-nodejs
(and I have `global = true` in my ~/.npmrc)
When I go to look for the .jsan directory in:
~/.nvm/v0.4.9/lib/
It's not there, nor elsewhere ..... so I put on my best sleuthing hat today and here's what I figured out:
If I do:
$ cd ~/.nvm/v0.4.9/lib/node_modules/task-joose-node-js
$ chmod +x __script/postactivate.sh
$ export npm_config_root=/Users/michael/.nvm/v0.4.9/lib/
$ __script/postactivate.sh
Tada!! Now the .jsan directory is in place and the files I want and expect are inside, ready for use with JooseX.Namespace.Depended (assuming I have the NODE_PATH environment variable set properly)
-------
So why isn't it that script running as part of `npm install ...` ?
$package->{ scripts } = {
"postactivate" => '$SHELL __script/postactivate.sh'
};
See the current npm documentation (and or the man page with `npm help scripts`):
There's no mention of `postactivate`; perhaps it should be changed to postinstall?