Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cljs-navalgrid

You need Java and node.js.

After pulling, run:

npm install

Generate a POM

shadow-cljs pom

Using the POM, the project can be fully recognized by IDEA

Development

npx shadow-cljs watch frontend browser-test

This will watch both, :frontend and :test build-ids in order to reload the browser and run tests every time a file is changed.

REPL

The watch process will have compiled the given code to public/js. The generated .js must be loaded in a browser in order for the REPL to be available.

Run Configurations+Clojure REPLRemote

  • nREPL
  • Use port from file with localhost
    • Use standard port file

Switch to CLJS by calling

(shadow/repl :frontend)

To drop back to CLJ call

:cljs/quit

Terminal

npx shadow-cljs node-repl

Browser

npx shadow-cljs browser-repl

Testing

The watch in Development will already run tests. Alternatively you can do any of the following.

Via REPL

You can load a test-file in the REPL and call (run-tests).

Via Command Line (node.js)

Compile and run all tests (any files with namespace ending in -test):

npx shadow-cljs compile test
node out/node-tests.js
  • When there are failures, the output will show which assertion failed and why
  • If all tests pass, the exit-code is zero

Release

shadow-cljs release frontend

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages