Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions examples/reagent-karma-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@ This project was bootstrapped with [Create CLJS App](https://github.com/filipesi

In the project directory, you can run:

### `yarn start`
### `npm start`

Runs the app in development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.

The app uses [Reagent](https://reagent-project.github.io), a minimalistic interface between ClojureScript and React.<br>
You can use existing npm React components directly via a [interop call](http://reagent-project.github.io/docs/master/InteropWithReact.html#creating-reagent-components-from-react-components).
You can use existing npm React components directly via an [interop call](http://reagent-project.github.io/docs/master/InteropWithReact.html#creating-reagent-components-from-react-components).

Builds use [Shadow CLJS](https://github.com/thheller/shadow-cljs) for maximum compatibility with NPM libraries. You'll need a [Java SDK](https://adoptopenjdk.net/) (Version 8+, Hotspot) to use it. <br>
Builds use [Shadow CLJS](https://github.com/thheller/shadow-cljs) for maximum compatibility with NPM libraries. You'll need a [Java SDK](https://adoptopenjdk.net/) (Version 11+, Hotspot) to use it. <br>
You can [import npm libraries](https://shadow-cljs.github.io/docs/UsersGuide.html#js-deps) using Shadow CLJS. See the [user manual](https://shadow-cljs.github.io/docs/UsersGuide.html) for more information.

### `yarn cards`

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

This environment uses [Devcards](https://github.com/bhauman/devcards) and [React Testing Library](https://testing-library.com/docs/react-testing-library/intro).

### `yarn build`
### `npm run build`

Builds the app for production to the `public` folder.<br>
It correctly bundles all code and optimizes the build for the best performance.
Expand All @@ -32,25 +25,25 @@ Your app is ready to be deployed!

## Other useful scripts

### `null` and `yarn e2e`
### `npm test` and `npm run test:karma`

You can use `null` to run tests a single time, and `yarn e2e` to run the end-to-end test app.
`yarn test` launches tests in interactive watch mode.<br>
`npm test` compiles and runs the tests once on Node (using jsdom).
`npm run test:karma` runs the same tests in a headless Chrome via Karma.

See the ClojureScript [testing page](https://clojurescript.org/tools/testing) for more information. E2E tests use [Taiko](https://github.com/getgauge/taiko) to interact with a headless browser.
See the ClojureScript [testing page](https://clojurescript.org/tools/testing) for more information.

### `yarn lint` and `yarn format`
### `npm run lint` and `npm run fmt`

`yarn lint` checks the code for known bad code patterns using [clj-kondo](https://github.com/borkdude/clj-kondo).
`npm run lint` checks the code for known bad code patterns using [clj-kondo](https://github.com/clj-kondo/clj-kondo).

`yarn format` will format your code in a consistent manner using [zprint-clj](https://github.com/clj-commons/zprint-clj).
`npm run fmt` formats the code in a consistent manner using [Prettier](https://prettier.io) with [prettier-plugin-cljfmt](https://github.com/olecve/prettier-plugin-cljfmt).

### `yarn report`
### `npm run report`

Make a report of what files contribute to your app size.<br>
Consider [code-splitting](https://code.thheller.com/blog/shadow-cljs/2019/03/03/code-splitting-clojurescript.html) or using smaller libraries to make your app load faster.

### `yarn server`
### `npm run server`

Starts a Shadow CLJS background server.<br>
This will speed up starting time for other commands that use Shadow CLJS.
Expand All @@ -68,4 +61,3 @@ Quick reference https://cljs.info/cheatsheet/.
Offline searchable docs https://devdocs.io/.

VSCode plugin https://github.com/BetterThanTomorrow/calva.

Loading
Loading