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.

59 questions
2
votes
0 answers

Using wildcards in sbt-concat in play framework 2

I have question concerning the integration of sbt-concat in play framework 2. I'm using sbt-concat 0.1.8 The file that I want to concatenate are in "javascripts/libs/jquery/jquery-ui/theme/smoothness/jquery-ui.css" Here is my build.sbt name :=…
Molochdaa
  • 2,158
  • 1
  • 17
  • 23
2
votes
2 answers

how to minify js produced by sbt-concat

I was doing my experiments using sbt-concat to combine css/js bundles. I then tried to expand my pipeline in order to do minify for my css and js. It is fairly easy to use sbt-css-compress which does minification of all the CSS produced by…
JMC
  • 393
  • 1
  • 12
2
votes
1 answer

How to change destination folder of compiled assets in PlayFramework 2.3.1?

Using PlayFramework 2.3.1, sbt-web, Scala 2.11. How to change destination folder of compiled assets form "public" to "pub" for example?
Lunigorn
  • 1,340
  • 3
  • 19
  • 27
1
vote
0 answers

Use different sbt-web SettingKey values when running `stage` and `run`

I am writing an SBT plugin. In the plugin, I have: val prod = SettingKey[Boolean]("prod", "This will minify stuffs.") In build.sbt of a project that uses this plugin, I want to set different values when running sbt stage and sbt run. I've tried many…
Tanin
  • 1,853
  • 1
  • 15
  • 20
1
vote
0 answers

Sbt Resolvers to not contain scala version on app name

Currently I have an issue using the sbt resolvers to find my project. I am currently publishing my project to https://artifacts.placeholder.io/artifactory/release-local/com/placeholder/app/placeholder-app/2.15.26/placeholder-app-2.15.26.pom I have…
Teddy Dong
  • 362
  • 1
  • 6
  • 20
1
vote
2 answers

Generating static assets from SBT Web

I have a project based on SBT-Web and Play Framework. Well, the Play is used just for development, then (when running stage command in SBT/Activator) everything is exported to static pages and deployed to some webserver that maybe does not Java even…
v6ak
  • 1,636
  • 2
  • 12
  • 27
1
vote
0 answers

How to specify directories in sbt-uglify options

I have a project based on play framework. I'm using sbt-uglify plugin to minify & concatenate the js files In my build.sbt I have defined UglifyKeys.uglifyOps := { js => Seq((js.sortBy(_._2), "javascripts/all.min.js")) } The above code includes…
user1184100
  • 6,742
  • 29
  • 80
  • 121
1
vote
1 answer

Play 2.4.x - Assets duplication

In a Play 2.4.6 app I'm working on the assets are being duplicated in stage/dist tasks. Basically it is a app with 3 submodules, with all the assets present in the main public folder. I don't have sbt-web enabled and have no webjars dependencies…
Salem
  • 12,808
  • 4
  • 34
  • 54
1
vote
0 answers

SbtWeb: uglify the output of traceur

I'm using the SbtWeb traceur plugin to transpile my code in a Play Framework (sbt/scala) project. This gives me an ES5 resource at /main.js. I want to then uglify the result into /main.min.js. I added the uglify plugin as well, and then tried to do…
Ben Dilts
  • 10,535
  • 16
  • 54
  • 85
1
vote
1 answer

How to exclude web-jars from processing with sbt-closure?

I am using sbt-web pipeline with sbt-closure, but by default it processes all assests including web-jars with causes problems with Reactjs files. How to exclude web-jars from processing with sbt-closure and process only my own javascript files?
codez
  • 1,381
  • 1
  • 18
  • 28
1
vote
0 answers

sbt-stylus with Fluidity

With the Stylus cli, I am able to add @import fluidity to my .styl files, and then define the path to the Fluidity distribution: stylus src/main/assets/styles --use node_modules/fluidity/lib/fluidity --out target/web/css But I can't figure out…
1
vote
0 answers

Converting to a multi-project build

I am trying to convert from an sbt single project to an sbt multiproject. I copied my src folder to a new directory website which I would like to use as a subproject. This changed the old (working) lazy val website = (project in…
Martijn
  • 11,964
  • 12
  • 50
  • 96
1
vote
0 answers

CSS changes not showing up

I have a Play 2.3.7 app configured with the sbt-web 1.1.0 plugin per the instructions under "Packaging and Publishing": lazy val admin = Project("admin", file("admin")). enablePlugins(play.PlayScala, SbtWeb). settings(commonSettings: _*). …
1
vote
0 answers

Play 2.3 RjsKeys.mainModule causes Error: paths fallback not supported in optimizer

On build.sbt, if I use these configs for rjs, RjsKeys.mainConfig := "build", RjsKeys.mainModule := "mainAccount", RjsKeys.modules += WebJs.JS.Object("name" -> "mainSFCanvas") it gives me this error: [info] Error: Error: paths fallback not…
angelokh
  • 9,426
  • 9
  • 69
  • 139
1
vote
1 answer

Play 2.3 jshint disable on vendor js

I have several vendor minified js under app/assets. How can I disable jshint to process these files? app/assets/js/vendor/angular-moment.min.js
angelokh
  • 9,426
  • 9
  • 69
  • 139