Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
Release version 0.6.3 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
akkie committed Sep 12, 2016
1 parent c1fae1b commit 36066a0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 34 deletions.
61 changes: 30 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
In your project/Build.scala:
```scala
libraryDependencies ++= Seq(
"com.mohiva" %% "play-html-compressor" % "0.6.2"
"com.mohiva" %% "play-html-compressor" % "0.6.3"
)
```

### History

* For Play Framework 2.5 use version 0.6.2
* For Play Framework 2.5 use version 0.6.3
* For Play Framework 2.4 use version 0.5.0
* For Play Framework 2.3 use version 0.3.1
* For Play Framework 2.2 use version 0.2.1
Expand Down Expand Up @@ -87,35 +87,6 @@ public class DefaultFilter implements HttpFilters {

```

### Customize filter behaviour

You have the possibility to customize filter behaviour without using class inheritance. For
that, you could adding the following keys on your `application.conf` file :

```
play.filters {
# Mohiva Compressor
# ~~~~~
# https://github.com/mohiva/play-html-compressor
compressor {
html {
preserveLineBreaks = true
removeComments = true
removeIntertagSpaces = false
removeHttpProtocol = true
removeHttpsProtocol = true
}
xml {
removeComments = true
removeIntertagSpaces = false
}
}
}
```


### Default filter

For the default filters we provide DI modules which will be automatically enabled if you
Expand Down Expand Up @@ -216,6 +187,34 @@ public class CustomHTMLCompressorFilter extends HTMLCompressorFilter {

```

### Customize filter behaviour

You have the possibility to customize filter behaviour without using class inheritance. For
that, you could adding the following keys on your `application.conf` file :

```
play.filters {
# Mohiva Compressor
# ~~~~~
# https://github.com/mohiva/play-html-compressor
compressor {
html {
preserveLineBreaks = false
removeComments = true
removeIntertagSpaces = false
removeHttpProtocol = true
removeHttpsProtocol = true
}
xml {
removeComments = true
removeIntertagSpaces = true
}
}
}
```

#### Provide bindings

To provide your bindings for your user defined filter you must either create a new module
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scalariform.formatter.preferences._

name := "play-html-compressor"

version := "0.6.2"
version := "0.6.3"

libraryDependencies ++= Seq(
"com.googlecode.htmlcompressor" % "htmlcompressor" % "1.5.2",
Expand Down
24 changes: 24 additions & 0 deletions conf/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,27 @@
# ~~~~~
play.modules.enabled += "com.mohiva.play.htmlcompressor.HTMLCompressorFilterModule"
play.modules.enabled += "com.mohiva.play.xmlcompressor.XMLCompressorFilterModule"

# The compressor config for the default filter. If you define a custom filter, then
# this config must be adapted.
# ~~~~~
play.filters {

# Mohiva Compressor
# ~~~~~
# https://github.com/mohiva/play-html-compressor
compressor {
html {
preserveLineBreaks = false
removeComments = true
removeIntertagSpaces = false
removeHttpProtocol = true
removeHttpsProtocol = true
}

xml {
removeComments = true
removeIntertagSpaces = true
}
}
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/release

resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.4")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.6")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
package com.mohiva.play.htmlcompressor

import akka.stream.Materializer
import akka.util.ByteString
import com.mohiva.play.compressor.Helper
import com.mohiva.play.htmlcompressor.fixtures.{ CustomHTMLCompressorFilter, DefaultFilter, RequestHandler, WithGzipFilter }
Expand Down

0 comments on commit 36066a0

Please sign in to comment.