Skip to content

Instantly share code, notes, and snippets.

@superstructor
Last active June 13, 2019 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superstructor/c7cacc2619993ada6eddae84e8705a59 to your computer and use it in GitHub Desktop.
Save superstructor/c7cacc2619993ada6eddae84e8705a59 to your computer and use it in GitHub Desktop.
shadow-cljs

shadow-cljs Notes

Use as a library with Leiningen, not the default Node.js CLI. This is because lein has a lot of other stuff the Node.js CLI does not; e.g.

  • garden CSS compilation
  • publishing to Clojars
  • lein ancient
  • lein deps :tree

When used as a library with lein, dependencies and source paths in shadow-cljs.edn are ignored. Instead those values are taken from project.clj. Use :lein true in shadow-cljs.edn so that it will re-use the same JVM as lein for efficiency.

With shadow-cljs NPM dependencies are defined in package.json and must be installed independantly with NPM or Yarn. lein and shadow-cljs will not download these for you.

Extremely rarily (I think its happened to me twice) shadow-cljs complilation cache can become stale; i.e. you see a failing test for something you have obviously changed to a different value in code. I'm not sure of the cause, maybe it misses the file change event. Either force compile button in dashboard or making a minor edit to the file in question appear to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment