function build( dest, options, clbk ) {
	var opath;
	var opts;
	var err;
	var cd;
	var cb;

	opts = copy( DEFAULTS );
	if ( arguments.length > 2 ) {
		cb = clbk;
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	} else {
		cb = options;
	}
	if ( !isString( dest ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', dest ) );
	}
	if ( !isFunction( cb ) ) {
		throw new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', cb ) );
	}
	cd = cwd();
	if ( opts.dir ) {
		opts.dir = resolve( cd, opts.dir );
	} else {
		opts.dir = cd;
	}
	debug( 'Options: %s', JSON.stringify( opts ) );

	opath = resolve( cd, dest );
	debug( 'Output directory: %s', opath );

	debug( 'Building README database...' );
	createDatabase( opts, onDatabase );

	/**
	* Callback invoked after building a README database.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {Object} db - database
	* @returns {void}
	*/
	function onDatabase( error, db ) {
		if ( error ) {
			return done( error );
		}
		debug( 'Finished building database.' );

		debug( 'Writing file contents...' );
		write( opts.dir, opath, db, done );
	}

	/**
	* Callback invoked upon writing file contents.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @returns {void}
	*/
	function done( error ) {
		if ( error ) {
			debug( 'Encountered an error: %s', error.message );
			return cb( error );
		}
		debug( 'Finished writing file contents.' );
		cb();
	}
}
Asynchronously generates an HTML rendered package README file tree.

@param {string} dest - output directory
@param {Options} [options] - function options
@param {string} [options.dir] - root directory from which to search for package READMEs
@param {string} [options.pattern='**\/package.json'] - glob pattern
@param {StringArray} [options.ignore] - glob pattern(s) to exclude matches
@param {string} [options.base="/docs/api/develop/"] - base path for internal URLs
@param {Function} clbk - callback
@throws {TypeError} first argument must be a string
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@throws {Error} `pattern` option must end with `package.json`
@throws {TypeError} last argument must be a callback function

@example
build( './build', done );

function done( error ) {
    if ( error ) {
        console.error( error.message );
        return;
    }
    console.log( 'Finished' );
}