Closed mauricioszabo closed 7 years ago
Thanks for this pull request. I'm glad you were able to find those settings for ClojureScript. I'm busy in the evenings with some work tasks but I should be able to take a look at this pull request, test, and merge in a couple days.
This works for me. Thanks again!
Fixes: https://github.com/jasongilman/proto-repl/issues/231
I know this is a kinda scary PR (after all, there are 126k deleted lines!), so I'll explain what I did:
There are two interesting options to compile ClojureScript -
:output-wrapper true
wraps resulting Javascript in(function() { })();
, so that variables will not become global. This means thatgoog
will not be exposed, and will not interfere with other packages that need to use it in the development process. The side-effect is that compilation will generate a single file - so, I've added two compilation rules for ClojureScript - one foredn_reader
and other forself_hosted
.For self-hosted, I added a main entrypoint (otherwise node complains). It's the same as
edn_reader
- just an emptyfn
.For some reason, proto-repl-charts was not downloading, so I upgraded the version in
project.clj
too, and then things compiled fine. I tested most of the functions (edn parsing, evaluation, self-hosting REPL, auto-complete) and they seem to work fine.