vb-archive

Creates ZIP archives for various application artifacts:

  1. build/sources.zip with application sources
  2. build/processed.zip with the contents of the build/processed directory; this directory is created either by the vb-process or vb-process-local tasks.
  3. build/optimized.zip with the contents of the directory; this directory is created by the vb-optimize task.

If any of the directories don't exist, the task will ignore it, instead of failing. If the task target is used with any of these values: sources, processed, optimize, for example:

grunt vb-archive:optimized

the vb-archive task creates just the corresponding ZIP archive. If no task target is specified, all three ZIP archives are created.

The following table describes the subtasks, hooks, and inputs and outputs of the vb-archive task:

Detail Description
subtasks n/a
multitask n/a
hooks n/a
input ${gitSources}, build/processed/*, build/optimized/*
output build/sources.zip, build/processed.zip, build/optimized.zip

The following table describes the options for the vb-archive task:

Name Mandatory Default Value Description
sources-zip-path no n/a Custom path to the source archive. The path needs to include the archive name as well as the extension, for example:

--sources-zip-archive=dist/myAppSources.zip

processed-zip-path no n/a Custom path to the processed assets archive. The path needs to include the archive name as well as the extension.
optimized-zip-path no n/a Custom path to the optimized assets archive. The path needs to include the archive name as well as the extension.