oakes / Nightlight

An embedded editor for Clojure
https://sekao.net/nightlight/
The Unlicense
788 stars 35 forks source link

Website is missing a step for CLJS REPL integration with lein #18

Closed ghost closed 7 years ago

ghost commented 7 years ago

If nightlight is going to be required in the core namespace, it has to be specified in the dependencies in project.clj also, or the build will choke with a namespace error.

Example snippet from lein sample project.clj

;;; Profiles
  ;; Each active profile gets merged into the project map. The :dev
  ;; and :user profiles are active by default, but the latter should be
  ;; looked up in ~/.lein/profiles.clj rather than set in project.clj.
  ;; Use the with-profiles higher-order task to run a task with a
  ;; different set of active profiles.
  ;; See `lein help profiles` for a detailed explanation.
  :profiles {:debug {:debug true
                     :injections [(prn (into {} (System/getProperties)))]}
             :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
             :1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
             ;; activated by default
             :dev {:resource-paths ["dummy-data"]
                   :dependencies [[clj-stacktrace "0.2.4"]]}
             ;; activated automatically during uberjar
             :uberjar {:aot :all}
             ;; activated automatically in repl task
:repl {:plugins [[cider/cider-nrepl "0.7.1"]]}}
oakes commented 7 years ago

You need to add Nightlight to the dependencies list in order to use it in the first place, so I don't think that part needs to be repeated.

ghost commented 7 years ago

Not quite. If it's in your ~/.lein/profiles.clj file as the website lists earlier, it will start up just fine (actually, nightlight starts either way). It's only when you go to follow the steps in the CLJS REPL section and require it in a project namespace that you run into this issue, when cljsbuild fails.

oakes commented 7 years ago

Ah, I see. I just updated the instructions. Thanks for letting me know.