Hi guys, I'm trying to execute a bonescript file from the command line ("node

Hi guys, I’m trying to execute a bonescript file from the command line (“node dog_with_a_bone.js”).
Is there a bonescript library file I can include for CLI use like this?
I’m trying:
var b = require ( “/usr/lib/node_modules/bonescript/bonescript.js”); // in place of require(‘bonescript’);
but I get some errors from the bonescript.js file wondering where his document object is, etc.

On an unrelated note: Moderators, please let me know if I should be posting this type of thing in a subforum/group.

Best to send it to http://beagleboard.org/discuss, but I haven’t gotten to all the questions there. With NODE_PATH set, it shouldn’t be needed to specify the long path.

I’ll post this sort of thing to /discuss in future! Sorry about that!

So, as for the subject of executing bonescripts with node.js at the command line instead of in a browser:
“echo $NODE_PATH” returns “/usr/lib/node_modules”.

My real question is, “How can I execute bonescripts with node.js?” When I try it now, I get an error from bonescript.js about the document object being missing:

/usr/lib/node_modules/bonescript/bonescript.js:16
var head = document.getElementsByTagName(‘head’)[0];
^
ReferenceError: document is not defined
at Object. (/usr/lib/node_modules/bonescript/bonescript.js:16:12)

Thanks in advance!