viebel / cljs-demo-npm

Demo project to show ClojureScript integration with npm modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshot demo

Setup

Ensure shadow-cljs is installed.

npm install --global shadow-cljs

Then install the node modules with:

npm install

Run locally with REPL

On one terminal, let shadow watch the build with:

shadow-cljs watch app

On another terminal, run the app with node:

node out/app/script.js

Connect your CLJS REPL client to the nrepl port shadow-cljs listens to. For instance, in Calva you run the command:

Connect to a running REPL in the current project

then you select shadow-cljs

afterwards you will be prompted to connect to :app

Now, you can evaluate CLJS code in the REPL.

Run locally as a standalone script

Ask shadow to compile with:

shadow-cljs release prod

Run the app with node:

node out/prod/script.js

About

Demo project to show ClojureScript integration with npm modules


Languages

Language:Clojure 100.0%