![]() Our config for it is in file which contains the same map as the :compiler map in now-removed :cljsbuild :min config. Running lein figwheel from the shell to boot a seperate JVM is the conventional usage. Note that this isn't officially supported. No :cljsbuild configĪs already mentioned, unless you have a specific need for it, most or all of :cljsbuild config maps, and the lein-cljsbuild plugin itself, can be removed from project.clj, because Fighweel is now able to do a minified build as well. You can wrap a component that autobuilds while your server is up and running by dissecting this code into a component, a dependency to your server component so that it starts first. The main was that each namespace would have a separate ‘page’ so running all tests in a project at once was not obviously possible. While devcards is useful for many things, and we enjoyed using it for running unit tests, there were a few gotchas in this use case. We moved the compiler config map itself from :cljsbuild :dev config in project.clj - more on it in the section below. ![]() the "test" directory is included in :watch-dirsīoth the :watch-dirs and :auto-testing are Figwheel config options, which we store in file as a metadata map of a compiler config map.Now the tests can be executed simply by navigating to localhost :9500/figwheel-extra-main/auto-testing when Figwheel is running, provided that: ![]() The nice thing about new Figwheel is that it includes a dedicated test runner so we were able to remove our devcards setup which we copied from 8th Light blog. Also, our specific case was to continue using Cursive nREPL integration - something we were enjoying with lein-figwheel. Type the following code in a file named core.cljs: (ns re) (js/alert 'Hello world') Copy. Migrating a Leiningen project to it is not too difficult but there may be a few gotchas, depending on your project, as figwheel-main doesn’t support all of the config options of lein-figwheel. Now its time to write your first ClojureScript namespace, which must conform to the path were currently in (note that you should replace the underscores with dashes in the directory name). ![]() Figwheel-main is a re-write of Figwheel, that doesn’t depend on lein-cljsbuild config and doesn’t require Leiningen at all. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |