makestatic-archive-zip
v1.0.4
Published
Create zip archive of build files
Downloads
3
Readme
Archive Zip
Create a zip archive of the build files
Install
yarn add makestatic-archive-zip
API
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.
context
Object the processing context.options
Object plugin options.
Options
name
String=build name of the zip archive.output
String=archive output directory.version
String=package key for automatic versioning.prefix
String prefix meta data path for zip entries.mode
Number=0x644 permissions bits.compress
Boolean=true setcompress
file option.forceZip64
Boolean=false setforceZip64Format
option.
.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.
file
File the current file.context
Object the processing context.options
Object plugin options.
.after
ArchiveZip.prototype.after(context, options)
Write the zip archive to disc.
Assigns the output archive path to context.data.archive
.
context
Object the processing context.options
Object plugin options.
License
MIT
Created by mkdoc on March 12, 2017