-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for configurable engine preferences (#3)
- Loading branch information
1 parent
1d460d7
commit 90597f9
Showing
6 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
travesty { | ||
cache.shape-cache-ttl = 5 minutes | ||
#JDK is most platform-independent, but slowest. CommandLine is fastest, but requires external dependencies | ||
engines = [JDK, V8, CommandLine] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/scala/net/mikolak/travesty/setup/GraphvizEngineType.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.mikolak.travesty.setup | ||
|
||
import guru.nidi.graphviz.engine.{AbstractGraphvizEngine, GraphvizCmdLineEngine, GraphvizJdkEngine, GraphvizV8Engine} | ||
|
||
object GraphvizEngineType extends Enumeration { | ||
|
||
protected case class Val(instantiate: () => AbstractGraphvizEngine) extends super.Val | ||
implicit def valueToPlanetVal(x: Value): Val = x.asInstanceOf[Val] | ||
|
||
val CommandLine = Val(() => new GraphvizCmdLineEngine()) | ||
val JDK = Val(() => new GraphvizJdkEngine) | ||
val V8 = Val(() => new GraphvizV8Engine) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters