Builder typedef

A function that builds the static resources and copies the ones needed for the html site to a distributable location.

function(options, folders)

Parameters

  1. options {Object}:

    The options passed to bit-docs/lib/generate/generate.

  2. folders {Object}:

    Paths to where the build should take place and the final static content should be copied to.

    • dist {String}

      The path where the final static content should be copied after it has been minified and prepared.

    • build {String}

      The path where the default static and options.static content have been copied.

Returns

{Promise}:

A promise that resolves when the build and copying have been successful.

Use

A builder that simply copies all static content over:

var Q = require('q'),
    fs = require('fs-extra'),
    copy = Q.denodify(fs.copy);
module.exports = function(options, folders){
  return copy(folders.build, folders.dist);
};