Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

NodeJS optimization error callback #568

Merged
merged 1 commit into from

3 participants

@guybedford

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

@toolness

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
@jrburke
Owner

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
View
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
});
</code></pre>
Something went wrong with that request. Please try again.