Questions tagged [sbt-web]

sbt-web is a plugin for Scala's SBT build system, which provides a build pipeline for client-side assets, allowing SBT to be a full-stack build tool for Scala web applications.

sbt-web provides features useful for building client-side web assets, including source file generation, an asset transformation pipeline (e.g. for minfication, gzip compression), incremental compilation, NPM compatibility, and Javascript execution engines.

While closely aligned with the Play Framework, sbt-web is compatible with any project that uses SBT for its builds. The related Webjars project allows client-side library resources to be included in the Scala build process.

58 questions
1
vote
1 answer

Exclude files from Play framework production build

I'd like to use sbt-web to process my client-side assets. I have some source files that are going to be fed into sbt-web, and sbt-web is going to output some distribution files. Is there a way to tell Play framework to exclude these source files…
1
vote
2 answers

How to enable SbtWeb in not-play project?

I have a single-project build, implemented in Build.scala file with the following settings: scala lazy val root = Project( id = ProjectInfo.name, base = file("."), settings = Project.defaultSettings ++ Revolver.settings ++…
Andrey Neverov
  • 1,995
  • 1
  • 11
  • 21
1
vote
1 answer

Play Framework sbt-concat does not work with wildcard setting

I was trying to bundle all css under a directory and its sub-directories. However, I found that only the files under direct level of the specified directory would be bundled, but not the ones in sub-directories. Then, I tried something like this to…
JMC
  • 363
  • 1
  • 11
1
vote
1 answer

Play Framework sbt-concat work partially

I was trying to use sbt-concat plugin from https://github.com/ground5hark/sbt-concat. However, I could not make it to work with wildcard. Here is my build.sbt. name := "webapp" version := "1.0-SNAPSHOT" scalaVersion := "2.10.4" lazy val root =…
JMC
  • 363
  • 1
  • 11
0
votes
1 answer

Spring Boot + Scala.js client resources not found

I want to combine Java/Scala sbt subprojects in a way that each module is a self-contained SPA micro-service. I am constrained to Spring Boot (Tomcat) to serve the files for historical reasons. I chose Scala.js to write the Javascript client side.…
0
votes
0 answers

How to specify intra-asset dependency in sbt-web?

I have developed an sbt-web plugin for Elm language for which I used as inspiration sbt-stylus plugin from this tutorial. The usage is the following: In assets/elm directory one can put an Elm project: i.e., *.elm files and elm-packages.json. The…
Alex Sutii
  • 283
  • 3
  • 8
0
votes
1 answer

Unable to get sbt-rjs plugin imported in play application

I wanted to concatenate JavaScript files in my java application which is built on play framework 2.5. In plugins.sbt, I have added the below code: addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8") I also added: resolvers += Resolver.url("SBT…
user1184100
  • 6,322
  • 27
  • 74
  • 116
0
votes
1 answer

Play Framework sbt-web integration without play plugin

Embedding play as a library, I enabled the sbt-web plugin in my project, and have run web-stage, making assets copied verbatim to target/web/stage/. However using Play Framework's string interpolation routing DSL as follows, they are not served when…
matanster
  • 13,785
  • 14
  • 75
  • 135
0
votes
0 answers

How to use scala-js artifacts with sbt-web within a single project?

I would like to use sbt-web and scala-js to create a webjar. So far I have added the artifactPaths of the scala-js artifacts to the mappings in Assets. This does work if I call fastOptJS and the files show up in the correct webjar location.…
Martin Ring
  • 5,306
  • 22
  • 46
0
votes
1 answer

How do I execute the sbt-web asset pipeline, specifically sbt-concat, before the tests are run?

I need a JavaScript file to exist before the tests are run. It is created using sbt-concat. How do I add the sbt-web asset pipeline as a dependency to running our spec tests?
0
votes
1 answer

SBT-web incremental compilation with file dependencies

I'm trying to write an set-web plugin which compiles sass files. I'm adhering to the convention that files with names starting with an "_" are not compiled directly, but they can be included in other files. I attempted to do this by using the…
irundaia
  • 1,640
  • 15
  • 24
0
votes
1 answer

How to prevent Play framework test execution from loading node modules?

in a play framework application each time I run "sbt test" it tries to load all node modules due to the fact that I have package.json in application root. Here is my sbt file: import play.PlayScala scalaVersion := "2.11.1" name :=…
Mironor
  • 1,115
  • 8
  • 23
0
votes
1 answer

How to change compilable static (CoffeeScript, LESS) source directory in Play Framework 2.3.1?

I'm using Play Framework 2.3.1 and Scala 2.11. I need to change LESS and CoffeeScript source directory from "app/assets" to "app/privateassets" for example. How to change it?
Lunigorn
  • 1,210
  • 3
  • 17
  • 27
1 2 3
4