There is an undocumented feature that you may use instead of a build
script. To generate the client-side libraries for your version of
NowJS, you can use nowjs.generateClientLibs().
The function signature is generateClientLibs(serverHost, serverPort,
exportPath). It takes a host and port and writes the generated
client-side file to exportPath (where exportPath is a valid relative
or absolute filesystem path).
So you could write a single-purpose script like this:
var nowjs = require('now');
nowjs.generateClientLibs('localhost', 8080, '/home/tom/');
Hope that helps.
--Sridatta
Also, Travis's reasoning is correct. Relative URLs would not work in
all cases and we don't want to make any assumptions.
Important correction. You must specify the name of the file in
IMHO, this is right. This would 1) allow to have multiple now.js
instances on the page; 2) fine grain security options; 3) draw
unobvious preparation of the file for vanilla static servers.
Best regards,
--Vladimir