makestatic-archive-zip v1.0.4
Archive Zip
Create a zip archive of the build files
Install
yarn add makestatic-archive-zipAPI
ArchiveZip
Creates a zip archive of the output files so you can archive builds and rollback to an earlier build if needed.
Integrates with the build-version plugin so your archives are
automatically versioned.
See Also
ArchiveZip
new ArchiveZip(context, options)Create an ArchiveZip plugin.
Configure this plugin for the emit phase, if you only want this plugin
to execute when a deploy is performed add it to the audit phase.
By default zip files are written to the archive directory, you can
change this path using the output option.
If the desination file exists it is overwritten. The output directory
must already exist.
If versions information is available (when the build-version plugin
has been configured) the file name will automatically include the version
using the key specified with the version option.
When the prefix option is not given it defaults to the basename of the
output directory.
contextObject the processing context.optionsObject plugin options.
Options
nameString=build name of the zip archive.outputString=archive output directory.versionString=package key for automatic versioning.prefixString prefix meta data path for zip entries.modeNumber=0x644 permissions bits.compressBoolean=true setcompressfile option.forceZip64Boolean=false setforceZip64Formatoption.
.before
ArchiveZip.prototype.before()Prepare the zip archive.
.sources
ArchiveZip.prototype.sources(file, context, options)Add each file to the archive.
Files marked as transient are ignored.
fileFile the current file.contextObject the processing context.optionsObject plugin options.
.after
ArchiveZip.prototype.after(context, options)Write the zip archive to disc.
Assigns the output archive path to context.data.archive.
contextObject the processing context.optionsObject plugin options.
License
MIT
Created by mkdoc on March 12, 2017