function build( dest, options, clbk ) {
	var opath;
	var popts;
	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( 'Searching for packages...' );
	popts = {
		'dir': opts.dir,
		'pattern': opts.packages_pattern,
		'ignore': opts.ignore
	};
	debug( 'Search options: %s', JSON.stringify( popts ) );
	findPkgs( popts, onPkgs );

	/**
	* Callback invoked after searching for packages.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {(EmptyArray|StringArray)} pkgs - package list
	* @returns {void}
	*/
	function onPkgs( error, pkgs ) {
		if ( error ) {
			return done( error );
		}
		debug( 'Found %d packages.', pkgs.length );

		debug( 'Generating bundles...' );
		bundle( pkgs, opath, opts, done );
	}

	/**
	* Callback invoked upon generating bundles.
	*
	* @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 generating bundles.' );
		cb();
	}
}
Asynchronously generates package browser benchmark bundles.

@param {string} dest - output directory
@param {Options} [options] - function options
@param {string} [options.bundle='benchmark_bundle.js'] - bundle filename
@param {string} [options.dir] - root directory from which to search for package benchmarks
@param {string} [options.html='benchmark.html'] - HTML filename
@param {StringArray} [options.ignore=[]] - ignore patterns
@param {string} [options.mount='/'] - base URL mount
@param {Object} [options.packages_pattern='**\/package.json'] - glob pattern
@param {Object} [options.files_pattern='benchmark\/**\/benchmark*.js'] - glob pattern
@param {string} [options.title='benchmark.html'] - HTML title
@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 {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' );
}