Closed viebel closed 8 years ago
It does import them and you can use them in ClojureScript/JavaScript, but as I told you already once on Slack, require is different. You need to provide the source file and IO.
You cannot pass ""
and no-op
as load-file
. It is actually a ClojureScript core requirement. Closing this.
Could you please provide a code example that works fine with goog libs?
I am pretty confident this is not a bug because we have tests against it. So a couple of things (sorry not enough time at the moment) to do:
fetch-file!
For the last task, if you use boot you can use lambda-x/boot-pack-source
project on GitHub.
Thanks for the reference. It works fine now. Except that I have to manually import some goog libs inside the code of my project e.g.
[goog.string.format]
[goog.date.Interval]
[goog.date.UtcDateTime]
What is the best way to import all the goog libs?
I am glad you solved! If you use boot
, you can check https://github.com/Lambda-X/boot-pack-source
An example usage is here
I'm not familiar with boot
.
I use leiningen
.
What should I do though?
Switch to boot! :smile:
I have not had the need to develop a lein
plugin as clojurescript.io
is using boot
but I guess an alternative solution would be to copy the files you need (it can be a lot) on the server under your src-paths
folder.
I was doing that before coming up with the boot task. Again, this is ClojureScript core and there is nothing we can do about it. Planck does the same, bundling the required files in the executable.
read-eval-call
fails to import google closure libs.I've tried this syntax: