-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Use REPL? #33
Comments
|
@JimTheMan this plugin doesn't affect how your code is compiled or executed or anything like that - so do whatever you normally do to get a REPL going. The template doesn't include a dependency on the cljsbuild plugin - if that's what you're used to doing, maybe add that - or else you can use the cljs compiler API. |
Thanks but this is what I normally do to get the REPL going, but it is not working- hence why I opened this issue. Can you please post how you are doing it? |
Ah, when I cd into src directory and remove the cljs-lambda.macros then I am able to access my functions. However, I'm still unsure about other dependencies. |
The problem is that I need to be in the src directory in order to access my namespaces, but it does not see any dependencies installed through something like |
@JimTheMan I'm not sure what you mean about "being in the src directory" - the REPL doesn't know what directory you're in, beyond the directory it was started in. I successfully did Note that my {:user
{:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
:dependencies [[com.cemerick/piggieback "0.2.2"]]
:plugins
[[cider/cider-nrepl "0.15.1"]]}} But that stuff is going to be dependent on your setup, and is just general configuration. Can you point me to another cljs project you can successfully start a REPL against? How are you starting it? |
I have also struggled with this. In the end I followed https://github.com/bhauman/lein-figwheel/wiki/Node.js-development-with-figwheel#nodejs-standalone-application-development-with-figwheel with some changes to keep it separate from the lambda function itself (as I only use it locally): To my ;...
:profiles {:dev {:dependencies [[org.clojure/tools.nrepl "0.2.12"]
[com.cemerick/piggieback "0.2.2"]
[figwheel-sidecar "0.5.14"]]
:cljsbuild
{:builds
{:dev
{:source-paths ["src"]
:figwheel true
:compiler
{:main node-main
:output-to "target/rbot-lambda/node-main-with-figwheel.js"
:output-dir "target/rbot-lambda"
:target :nodejs
:language-in :ecmascript5
:optimizations :none
:source-map true
:pretty-print true}}}}
:source-paths ["dev"]
:repl-options {:init-ns user
:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl]
}}} and I have created and then I run (require '[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!)
(ra/cljs-repl) the last thing i need to do is to start Node:
|
Hi, I scaffold a new project with
lein new serverless-cljs ok-then
and cd into the directory with project.clj.I then add one function to my core.clj like this:
How can I call this function from the REPL?
The text was updated successfully, but these errors were encountered: