Skip to content

Template for Clojurescript Reagent App working with DevCards or Standalone

License

Notifications You must be signed in to change notification settings

omnyway-labs/cljs-shadow-devcards-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template for Clojurescript Reagent App working with DevCards or Standalone

This project was started from running Create CLJS App and then:

You can Use this template this as a starting point for simple reagent applications and Devcards that will work with reagent

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in development mode.
Open http://localhost:3000 to view it in the browser. The page will reload if you make edits.

The app uses Reagent, a minimalistic interface between ClojureScript and React.
You can use existing npm React components directly via a interop call.

Builds use Shadow CLJS for maximum compatibility with NPM libraries. You'll need a Java SDK (Version 8+, Hotspot) to use it.
You can import npm libraries using Shadow CLJS. See the user manual for more information.

yarn cards

Runs the interactive live development enviroment.
You can use it to design, test, and think about parts of your app in isolation.

This environment uses Devcards and React Testing Library.

yarn build

Builds the app for production to the public folder.
It correctly bundles all code and optimizes the build for the best performance.

Your app is ready to be deployed!

Other useful scripts

NOTE: e2e and yarn lint are not working for me - R. Berger may 2021

yarn test and yarn e2e

You can use yarn test to run tests a single time, and yarn e2e to run the end-to-end test app. yarn test:watch launches tests in interactive watch mode.

See the ClojureScript testing page for more information. E2E tests use Taiko to interact with a headless browser.

yarn lint and yarn format

yarn lint checks the code for known bad code patterns using clj-kondo.

yarn format will format your code in a consistent manner using zprint-clj.

yarn report

Make a report of what files contribute to your app size.
Consider code-splitting or using smaller libraries to make your app load faster.

yarn server

Starts a Shadow CLJS background server.
This will speed up starting time for other commands that use Shadow CLJS.

Useful resources

Clojurians Slack http://clojurians.net/.

CLJS FAQ (for JavaScript developers) https://clojurescript.org/guides/faq-js.

Official CLJS API https://cljs.github.io/api/.

Quick reference https://cljs.info/cheatsheet/.

Offline searchable docs https://devdocs.io/.

License

Released under MIT License

Copyright (c) 2019-present, Filipe Silva. Copyright 2020 Robert Berger

About

Template for Clojurescript Reagent App working with DevCards or Standalone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published