Closed j1mr10rd4n closed 8 years ago
@j1mr10rd4n do you use the contents of target/
during development? The serve
task is setup to just serve from the classpath and I usually don't write them to target/
at all. Maybe this is something that should only be added to the production build pipeline?
I have found it useful to set :resource-root "target"
on the serve
task to see intermediate artifacts and debug generated javascript. Whether or not I should be doing this is another question, but sometimes it is easier to throw in a console.log() into the js when scripts aren't behaving as expected.
If you'd prefer to keep the default build
task clean, I could certainly set that as default behaviour modified by an option set in the production
task.
I have found it useful to set :resource-root "target" on the serve task to see intermediate artifacts and debug generated javascript.
Have you considered keeping :resource-root
as is and just using target
in the end? Wouldn't that get you the same effect? (i.e. compiled stuff is in target/
where you can inspect it)
Leaving :resource-root
as-is means that the compiled javascript runs from the classpath, as you said. It's one thing to be able to inspect the contents of target/
but, on occasion, when debugging, I have found it helpful to be able to make on-the-fly changes to the compiled js as it's running.
This is where setting :resource-root "target"
has helped, otherwise you have to go digging in boot's temporary fileset folders in ~/.boot/cache/temp
.
@martinklepsch I've made a couple of changes to improve this PR - target
is now optional and set to be called by default only in the production
task.
Hey Jim, how would you feel about instead of implicitly triggering target
adding a note to the readme explaining "how to write things to disk"?
I'm thinking by doing this users will understand what they're doing and they'll be able to make use of this understanding in whatever context they might want it. With the current setup I quickly see people asking how they can also write to target during development or similar.
Does that make sense?
It sure does, I'm closing this PR in favour of #67.
This PR follows the recommendations in the boot FAQ.
The implicit
target
task is deprecated. In order to silence the warning about this, an explicittarget
task is added and the deprecated behaviour is switched off by puttingBOOT_EMIT_TARGET=no
inboot.properties
.This should also take care of issue #60.