Skip to content


Subversion checkout URL

You can clone with
Download ZIP


NodeJS optimization error callback #568

merged 1 commit into from

3 participants


This amends the 'Use with Node' section to include the NodeJS error callback within the current optimization code example.


Thanks for this contribution! I just had to find this out the hard way, as my build script was bailing with no output, and guessed that there might be an undocumented third parameter to optimize(). Was about to add it to the docs when I found this pull request. :)

@jrburke jrburke merged commit cb17b88 into jrburke:master

Merged and applied to site. Thanks @toolness for pinging on this ticket, I wanted to merge earlier, but was heading out for vacation and it slipped through my task list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2012
  1. @guybedford
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  docs/node.html
2  docs/node.html
@@ -171,6 +171,8 @@ <h3 id="optimizer">Using the optimizer as a node module</h3>
//included. Load the built file for the contents.
//Use config.out to get the optimized file contents.
var contents = fs.readFileSync(config.out, 'utf8');
+}, function(err) {
+ //optimization err callback
Something went wrong with that request. Please try again.