Error handling with node.js streams

What’s the correct way to handle errors with streams? I already know there’s an ‘error’ event you can listen on, but I want to know some more details about arbitrarily complicated situations. For starters, what do you do when you want to do a simple pipe chain: input.pipe(transformA).pipe(transformB).pipe(transformC)… And how do you properly create one … Read more

Node package ( Grunt ) installed but not available

I’m trying to build a github jquery-ui library using grunt, but after running npm install I still can’t run the command according to the readme file. It just gives No command ‘grunt’ found: james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ grunt build No command ‘grunt’ found, did you mean: Command ‘grun’ from package ‘grun’ (universe) grunt: command not found james@ubuntu:~/Documents/projects/ad2/lib/jquery-ui$ npm … Read more

How to publish an npm package with distribution files?

I would like to publish a npm package that contains my source as well as distribution files. My Github repository contains src folder which contains JavaScript source files. The build process generates dist folder that contains the distribution files. Of course, the dist folder is not checked into the Github repository. How do I publish … Read more