UNPKG

makestatic-emit-gzip

Version:

Emits static gzip files

80 lines (56 loc) 2.22 kB
# Emit Gzip > Compress output assets Creates static `.gz` files for each output file. --- - [Install](#install) - [API](#api) - [EmitGzip](#emitgzip) - [.sources](#sources) - [License](#license) --- ## Install ``` yarn add makestatic-emit-gzip ``` ## API ### EmitGzip Plugin that generates gzip files for each output file. #### .sources ```javascript EmitGzip.prototype.sources(file, context, conf) ``` For each file compress the file `content` using the `zlib` module and add a new file to the pipeline with a `.gz` file extension. Before this plugin is executed files must have been assigned a `content` buffer. Files marked as `transient` are ignored. If the `gzip` context option is not set this function call is a noop. * `file` Object the file being processed. * `context` Object the processing context. * `conf` Object the plugin configuration. ## License MIT --- Created by [mkdoc](https://github.com/mkdoc/mkdoc) on March 12, 2017 [docs]: https://makestatic.ws/docs/ "Documentation" [standalone manual]: https://github.com/makestatic/website/blob/master/MANUAL.md "Standalone Manual" [yarn]: https://yarnpkg.com "Yarn" [webpack]: https://webpack.js.org "Webpack" [babel]: https://babeljs.io "Babel" [postcss]: http://postcss.org "Postcss" [sugarss]: https://github.com/postcss/sugarss "Sugarss" [reshape]: https://github.com/reshape/reshape "Reshape Source Code" [reshapeml]: https://reshape.ml "Reshape" [clean-css]: https://github.com/jakubpawlowicz/clean-css "Clean CSS" [html-minifier]: https://github.com/kangax/html-minifier "Html Minifier" [uglify-js]: https://github.com/mishoo/UglifyJS2 "Uglify JS" [imagemin]: https://github.com/imagemin/imagemin "Imagemin" [mkdoc]: https://github.com/mkdoc/mkdoc "Mkdoc" [browsersync]: https://www.browsersync.io "Browsersync" [yeoman]: http://yeoman.io "Yeoman" [spike]: https://www.spike.cf "Spike" [validator]: https://github.com/validator/validator "HTML Validator" [github pages]: https://pages.github.com "Github Pages" [amazon s3]: https://aws.amazon.com/s3/ "Amazon S3" [google sitemaps]: https://support.google.com/webmasters/answer/183668?hl=en&ref_topic=4581190 "Google Sitemaps" [sitemaps]: https://www.sitemaps.org/ "Sitemaps"