How to Debug ClojureScript

后端 未结 5 1402
花落未央
花落未央 2021-01-31 17:31

I apologize for this seemingly stupid question, but I\'ve been playing with ClojureScript on and off for a few weeks now, and I can\'t figure out this one simple question:

5条回答
  •  半阙折子戏
    2021-01-31 18:04

    UPDATED: Using the compiler directly is now straightforward. But lein-cljsbuild is still very useful.

    Use lein-cljsbuild. You can write different builds (testing, development, release). You can auto-watch files so they recompile quickly as you change them. You can easily use browser repl to evaluate code directly in the browser. You can manage dependencies.

    Specifically related to your question - lein-cljsbuild also passes along sensible warning defaults to the compiler so that you get verbose and accurate warnings before you actually run the code in the browser.

提交回复
热议问题