joelcarranza/particular-pinboard — pull request #2 by telemachus (2013-03-27 00:23:16+00:00)
Title: Tweak the build script

First, thanks for particular-pinboard.

This may not be important or useful for you, but I've tried to clean up and simplify (in a fashion) the build script.

Here's what I've done:

+ Try harder to find `uglifyjs`. If a user installs it with `npm`, then by default it won't be global. So look for it in `./node_modules` if `which uglifyjs` has no results.
+ Remove the dependency on Python. It's not necessary. (You can simply print "javascript:" to a file without a newline and then append to the same file.)
+ Make it a straight `sh` shell script. There aren't any Bashisms anyhow, so this makes it theoretically more portable.
+ Add `2>/dev/null` to all the calls to `uglifyjs -mt` -- which otherwise spits a lot of annoying blank lines as output to `stdout`.

I ran this and your version and did quick diffs. As far as I can tell, this produces identical output to the earlier version. Nevertheless, you may want to look over the `readlater.js` and `pinbook.js` outputs. The only one that I've live-tested is `bookmark.js`.