magomimmo / modern-cljs

A series of tutorials on ClojureScript
2.92k stars 288 forks source link

boot says it compiled, but not creating a 'target' folder #369

Open Jobava opened 8 years ago

Jobava commented 8 years ago

I followed the tutorial here:

https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-01.md

I got stuck at the compilation stage. Boot says exactly what it should (no errors or warnings:

boot cljs
Writing main.cljs.edn...
Compiling ClojureScript...
• main.js

Except there is no 'target' folder created

I created a repo containing the exact file and folder structure, as described in the tutorial: https://github.com/Jobava/bugreport-modern-cljs

Any hint would be welcome.

jbranchaud commented 8 years ago

I ran into this issue as well.

One way I dealt with it was using boot cljs -s -- target.

Another approach was to create a custom task in build.boot that includes the target task:

(deftask dev []
  (comp
    (cljs)
    (target :dir #{"target"})))

and then run boot dev to compile to target.

edit: the name of the target directory in the second example may be redundant

magomimmo commented 8 years ago

Sorry to be so late. In the mean time, boot has been update to 2.6.0 and few things have changed. If you issued the boot -u command at the terminal after having installed boot you should now receive the following feedback when executing the boot --version command:

boot --version
#http://boot-clj.com
#Sat Jun 18 16:03:23 CEST 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.6.0

I did not test all the tutorials of the series to verify that they are all still working. If you want to stay with the latest 2.6.0 boot release you should add the target task:

boot cljs target
Writing main.cljs.edn...
Compiling ClojureScript...
• main.js
Writing target dir(s)...

But I can't ensure that all the other tutorials are still working. Until I'll have the time to test them all, I suggest to pin the 2.5.5 boot release as explained in the tutorial-01:

BOOT_VERSION=2.5.5 boot -V > boot.properties

and add BOOT_EMIT_TARGET=no to boot.properties file to obtain:

#http://boot-clj.com
#Sun Jan 03 10:26:34 CET 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.5.5
BOOT_EMIT_TARGET=no

HIH