Using Web Jars

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Web Jars

cfaddict
Is there any support for using webjars (www.webjars.org) in ratpack? I see it works in SpringBoot but it takes a little configuring to do http://spring.io/blog/2014/01/03/utilizing-webjars-in-spring-boot and I just wondered if one it works and two how to set it up.

I threw angular in my dependency block and it downloaded it but I have no idea where to

dependencies {
  // SpringLoaded enables runtime hot reloading.
  // It is not part of the app runtime and is not shipped in the distribution.
  springloaded "org.springframework:springloaded:1.2.0.RELEASE"

  // Default SLF4J binding.  Note that this is a blocking implementation.
  // See here for a non blocking appender http://logging.apache.org/log4j/2.x/manual/async.html
  runtime 'org.slf4j:slf4j-simple:1.7.7'

  testCompile "org.spockframework:spock-core:0.7-groovy-2.0"


  // webjars
  compile 'org.webjars:angularjs:1.3.0-rc.2'
}
Reply | Threaded
Open this post in threaded view
|

Re: Using Web Jars

uris77
I've never used webjars, but I think it would be just a matter of figuring out where  the files are being downloaded to. Then copy them to src/ratpack/public. Your  ratpack app should then configure that folder as  an  asset so you can access it from the browser: asset "public".
Reply | Threaded
Open this post in threaded view
|

Re: Using Web Jars

Luke Daley
Administrator
In reply to this post by cfaddict
There’s no core support for WebJars at this time.