cljsbuild

Multiple ClojureScript files on same page

て烟熏妆下的殇ゞ 提交于 2019-12-23 12:18:13
问题 I have a project that is using Jasmine to test the JavaScript. I am trying to switch to using ClojureScript for the front end. My project.clj is like (defproject myproject "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojurescript"0.0-1889"] [org.clojure/google-closure-library-third-party "0.0-2029"] [domina "1.0.0"] [hiccups "0.2.0"]] :plugins [[lein-cljsbuild "0.3.3"]] :cljsbuild { :builds [{ :source-paths ["src/clojurescript"] :compiler { :output-to "public

Clojurescript libraries - goog.require could not find

£可爱£侵袭症+ 提交于 2019-12-22 05:29:17
问题 New to clojurescript, and working through the "Modern CLJS" tutorial here. It instructs to pull in domina by adding it to the project.clj : :dependencies [[org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [domina "1.0.0"]] And then use it in your script by referencing it in the ns form (ns cljstut.login (:use [domina :only [by-id value]])) However, when I actually run this in a browser, I see the following in the console log. goog.require could not find: domina Seems like I'm missing some

Project organization and cljsbuild config to require namespace

二次信任 提交于 2019-12-13 06:06:30
问题 How do I organize my project structure and configure cljsbuild to require my own namespace? For example in my project/src-cljs folder I have: └── project ├── file1 │ └── file1.cljs ├── file2 │ └── file2.cljs └─── required └── required.cljs I'd like file1.cljs (namespaced as file1.file1 ) and file2.cljs (namespaced as file2.file2 ) to require required.cljs (namespaced as required.required ). My :cljsbuild looks like: :cljsbuild {:builds [{:source-paths ["src-cljs/project/file1"] :compiler {

lein figwheel vs lein cljsbuild auto

安稳与你 提交于 2019-12-07 05:42:36
问题 What is the difference between lein figwheel and lein cljsbuild auto because I believe that they are both used to compile clojurescript. Also is there any benefit to using one over the other? 回答1: Fighweel They are both lein plugins but Figwheel not only compiles cljs into javascript but it also features hot loading which allows interactive programming, actually Figwheel uses cljsbuild for compiling cljs. You can create a figwheel app using: lein new figwheel app If you run: lein figwheel