Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbt/sbt-gzip
sbt-web plugin for gzipping assets
https://github.com/sbt/sbt-gzip
Last synced: 2 months ago
JSON representation
sbt-web plugin for gzipping assets
- Host: GitHub
- URL: https://github.com/sbt/sbt-gzip
- Owner: sbt
- Created: 2014-04-09T00:53:04.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T09:42:39.000Z (3 months ago)
- Last Synced: 2024-10-18T05:51:03.671Z (3 months ago)
- Language: Scala
- Size: 57.6 KB
- Stars: 26
- Watchers: 14
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-sbt-plugins - sbt-gzip
README
sbt-gzip
==========[sbt-web] plugin for gzip compressing web assets.
[![Build Status](https://github.com/sbt/sbt-gzip/actions/workflows/build-test.yml/badge.svg)](https://github.com/sbt/sbt-gzip/actions/workflows/build-test.yml)
Add plugin
----------Add the plugin to `project/plugins.sbt`. For example:
```scala
addSbtPlugin("com.github.sbt" % "sbt-gzip" % "2.0.0")
```Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:
lazy val root = (project in file(".")).enablePlugins(SbtWeb)
As with all sbt-web asset pipeline plugins you must declare their order of execution e.g.:
```scala
pipelineStages := Seq(gzip)
```Configuration
-------------### Filters
Include and exclude filters can be provided. For example, to only create
gzip files for `.js` files:```scala
gzip / includeFilter := "*.js"
```Or to exclude all `.js` files but include any other files:
```scala
gzip / excludeFilter := "*.js"
```The default filter is to only include `.html`, `.css`, and `.js` files:
```scala
gzip / includeFilter := "*.html" || "*.css" || "*.js"
```Contribution policy
-------------------Contributions via GitHub pull requests are gladly accepted from their original author.
License
-------This code is licensed under the [Apache 2.0 License][apache].
[sbt-web]: https://github.com/sbt/sbt-web
[apache]: http://www.apache.org/licenses/LICENSE-2.0.html