This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-21
Channels
- # admin-announcements (3)
- # beginners (15)
- # boot (96)
- # cider (5)
- # cljsjs (2)
- # cljsrn (3)
- # clojure (22)
- # clojure-austin (2)
- # clojure-russia (16)
- # clojured (2)
- # clojurescript (65)
- # css (4)
- # cursive (89)
- # datomic (7)
- # emacs (89)
- # events (1)
- # hoplon (126)
- # leiningen (2)
- # off-topic (2)
- # om (268)
- # onyx (19)
- # parinfer (42)
- # re-frame (5)
- # reagent (30)
- # yada (8)
@mobileink: neat idea!
I can run my task just fine, but when I run boot test I get:
clojure.lang.ExceptionInfo: java.io.FileNotFoundException: Could not locate boot/core__init.class or boot/core.clj on classpath.
I’ve pushed the code to https://github.com/bendyorke/boot-postcss
still very much so a work in progress, first thing I’ve really done with clojure or anything java related, so I’m sure it’s something simple. I’ll keep digging!
I have a question about boot-cljs we are currently migraten from leiningen to boot but I cannot get our advanced clojurescript build fixed, it fails because externs don’t seem to get picked up
I have a deps.cljs file with these contents:
{:externs ["relations.ext.js”]}
and some externs in that file:
var mixpanel = {};
mixpanel.track = function() {};
mixpanel.init = function() {};
mixpanel.identify = function() {};
mixpanel.people.set = function() {};
mixpanel.people.increment = function() {};
var events = {};
events.onAny = function() {};
events.emit = function() {};
var dialog = {};
dialog.getButton = function() {};
dialog.close = function() {};
dialog.bind = function() {};
dialog.create = function() {};
var dialogButton = {};
dialogButton.bind = function() {};
var nativeEvent = {};
nativeEvent.target = {};
var target = {};
target.files = {};
Just make sure the deps.cljs is in the classpath
It seems to get picked up because when I make an error I get the warnings
But when I compile I still get this error:
Uncaught TypeError: mixpanel.md is not a function
deps.cljs in src/cljs/
and I have this in my build.boot file: :source-paths #{"src/cljs" "src/clj" "src/cljc" "src/public”}
And I got these warnings (to check if the file get’s picked up)
Feb 21, 2016 11:55:11 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/mitkuijp/.boot/cache/tmp/Users/mitkuijp/Development/relations_for_jira/wq3/-lsqdbp/relations.ext.js:1: WARNING - accessing name mixpanel in externs has no effect. Perhaps you forgot to add a var keyword?
mixpanel = {};
^
Might this be because I only have externs in my deps.cljs
?
do I need to add deps.cljs
to resource-paths
@juhoteperi?
Something else was causing the problem.. Sorry for the noise
Works like a charm now
Am I correct in assuming that boot
will check for each SNAPSHOT dependency, that it's current on each run?
bummer!
might explain why boot startup is slow
Boot should work the same in this case as Lein. Both are just calling Aether to resolve deps. And there is some cache to only check snapshot versions like once per day.
that's totally reasonable then
another question. The wiki has:
:target-path
A path string. This directory is where final artifacts will be written. Default value is "target". For more information, see Target Directory.
-- isn't that outdated, now that there is the target
task?Maybe this one: Implicit target dir is deprecated, please use the target task instead. Set BOOT_EMIT_TARGET=no to disable implicit target dir.
right so that's referring to the deprecated behavior of automatically writing files to the :target-path
directory
to disable the deprecated behavior you can set that environment variable in your shell or in boot.properties
ok, I dont state anywhere :target-path, neither in build.boom or profile.boot... but let me research it...
so the deprecated behavior is that whenever you run boot it will by default create a target directory and put files in there
the new behavior is to have a task for that, which you call explicitly as part of the pipeline
Should I add this to the wiki then? "Note that as of Boot 2.5, setting a target directory using :target-path` has been deprecated in favor of the builtin target task. See Target Directory
@pesterhazy: yeah that would be awesome
ok... I just type sepcifically :reload {:target target ...etc...} for my build profile(development)?
@micha, done
@pesterhazy: thanks! 🍻
So, I have boot project, I want my target directory to be myproject/target. I would need to specify it with target . Maybe better if I can find some example project. Not My development is this, form tenzing: (deftask development [] (task-options! cljs {:optimizations :none :source-map true} reload {:on-jsload 'om-boot.app/init}) identity)
if you start a boot repl, boot repl
, you can do (doc target)
to see the options the target task supports
boot.user=> (doc target)
-------------------------
boot.task.built-in/target
([& {:keys [help dir no-link no-clean], :as *opts*}])
Writes output files to the given directory on the filesystem.
Keyword Args:
:help bool Print this help info.
:dir #{str} The set of directories to write to (target).
:no-link bool Don't create hard links.
:no-clean bool Don't clean target before writing project files.
nil
you can see the type annotations there that tell you which types the option arguments need to be
so if you want to set the default directory where the target task will put things, you can do this:
you would still need to have the target
task in the pipeline, but you wouldn't need to specify the :dir
option there
ok, that makes sense, and I guess one should also put BOOT_EMIT_TARGET=no in boot.preoperties, or maybe that doesnt matter if target dir is specified. I will see. Thanks!
@micha, thanks for your help. I'll buy you an actual next time you're in berlin!
next clojured, perhaps?
well, this year's was yesterday
met @juhoteperi though, that was cool
yeah that's the best part of conferences