Hey folks, I'm trying to develop a build.boot
file for cljsjs and wondering if I can run individual deftasks
while working on them. They seem to return functions, but I don't see anywhere where the arguments to those functions are documented.
@clashthebunny In a REPL you can run tasks using the boot
function.
How do you compose the steps of the tasks?
See the README https://github.com/boot-clj/boot#build-from-the-repl
You'll also want to read the Task Writer's Guide https://github.com/boot-clj/boot/wiki/Task-Writer%27s-Guide
How would I run the subsequent task multiple times without repeating the first task. Like, I want to run download
once and then run build
multiple times.
Kinda like a docker container build only re-runs the lines after the change?
It's just code: just call the build
task multiple times.
It seems to run correctly when I run (boot (download-mcw-react) (build-material-components-react))
but when I run (boot (download-mcw-react))
(boot (build-material-components-react))` I get
java.io.IOException: error=2, No such file or directory
.
The stacktrace should tell you where that error is originating.
Ah, each boot
pipeline works on a fresh fileset. Unless you use target
to write files after the download, they won't be there for a subsequent boot
pipeline.
Yeah! So, I need to export the fileset each time I'm done with a task?
If you want to run tasks in separate pipelines, yes, you need to use target
to save the files to a concrete folder, then subsequent pipelines need that folder as one of the inputs.