staticDist
Builds a static distributable which will eventually be copied
to the static
folder of the generated output.
.build.staticDist(options)
Builds the static distributable with the following steps:
- Copies everything from documentjs/site/default/static to documentjs/site/static/build.
- Overwrites site/static/build with content in
options.static
. - Writes a
package.json
file to documentjs/site/static/build. - Runs
npm install
in documentjs/site/static/build to get the dependencies for the build. - Calls that "build" function at documentjs/site/static/build/build.js with the options and returns the result.
The "build" module is expected to build a minified distributable and copy the necessary contents to documentjs/site/static/dist and return a promise that resolves when complete.
Parameters
-
options
{Object}
Returns
{Promise}
A promise that resolves if the static dist was successfully created.