js-kyle / mincer

Sprockets inspired web assets compiler for Node.js
http://js-kyle.github.io/mincer/
MIT License
628 stars 84 forks source link

Incorrect documentation for Manifest#compile #203

Closed ricardograca closed 9 years ago

ricardograca commented 9 years ago

In the docs it says that compile() accepts the following arguments:

Manifest#compile(files[, callback]) -> Object

However, it should be [, options] instead of [, callback].

Also, the example of a restrictive Mincer.Server also reinforces the notion of a callback as the second argument, when in fact it isn't supported. The current example shows:

// production mode (restrictive)
var files = ['app.js', 'app.css', 'logo.jpg'];
manifest.compile(files, function (err, manifestData) {
  var srv = new Server(env.index, manifestData);
});

when it should be:

// production mode (restrictive)
var files = ['app.js', 'app.css', 'logo.jpg'];
var manifestData = manifest.compile(files);
var srv = new Server(env.index, manifestData);