sbt / sbt-rjs

RequireJs optimizer plugin for sbt-web
Other
39 stars 28 forks source link

Unable to get sbt-rjs incremental execution to work without clean #11

Closed mmurray closed 10 years ago

mmurray commented 10 years ago

I'm trying to use sbt-rjs in a non-play sbt project.

My plugins.sbt includes this:

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.0-RC3")

And my build.sbt includes this:

import RjsKeys._
import WebJs._

lazy val root = (project in file(".")).enablePlugins(SbtWeb)

JsEngineKeys.engineType := JsEngineKeys.EngineType.Node

pipelineStages := Seq(rjs)

The first time I invoke sbt web-stage everything works perfectly, but on subsequent re-runs nothing happens. The only way I can get the pipeline to run again is if I remove the resulting artifacts from my target directory. So sbt ~web-stage won't work, I have to do something like ~;clean; web-stage.

huntc commented 10 years ago

sbt-rjs won't run again unless there are changes to your source files... is this what you're seeing?

mmurray commented 10 years ago

It's not what I'm seeing. Even after I make changes to my file in src/main/assets/javascripts/main.js, when I run sbt web-stage a second time it does not pick up the changes and my target/web/stage/javascripts/main.js is not updated to reflect the changes. The only way I can get it to rerun is to clean first.

huntc commented 10 years ago

That sounds like a bug. I shall investigate. Thanks.

huntc commented 10 years ago

@murz Found the problem - PR has been attached and being reviewed. Will make an interim release shortly and notify you of the version.

huntc commented 10 years ago

@murz Published under version 1.0.0-2014-05-28-5509668.