Skip to content

sbt/sbt-gzip

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

sbt-gzip

sbt-web plugin for gzip compressing web assets.

Build Status Download

Add plugin

Add the plugin to project/plugins.sbt. For example:

addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.2")

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.:

pipelineStages := Seq(gzip)

Configuration

Filters

Include and exclude filters can be provided. For example, to only create gzip files for .js files:

includeFilter in gzip := "*.js"

Or to exclude all .js files but include any other files:

excludeFilter in gzip := "*.js"

The default filter is to only include .html, .css, and .js files:

includeFilter in gzip := "*.html" || "*.css" || "*.js"

Contribution policy

Contributions via GitHub pull requests are gladly accepted from their original author. Before we can accept pull requests, you will need to agree to the Typesafe Contributor License Agreement online, using your GitHub account.

License

This code is licensed under the Apache 2.0 License.

About

sbt-web plugin for gzipping assets

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages