All Projects → paulbutcher → electron-app

paulbutcher / electron-app

Licence: EPL-1.0 License
Electron app with deps.edn, figwheel.main, reagent, and test integration

Programming Languages

clojure
4091 projects
HTML
75241 projects

Projects that are alternatives of or similar to electron-app

tomaat
🍅 Slack integrated pomodoro timer... with Electron + ClojureScript!
Stars: ✭ 61 (+110.34%)
Mutual labels:  reagent, figwheel
rata
State management through Datascript and Reagent
Stars: ✭ 42 (+44.83%)
Mutual labels:  reagent
ornament
Clojure Styled Components
Stars: ✭ 92 (+217.24%)
Mutual labels:  reagent
tengen
Simple let-based Reagent component fns for Clojure/Script
Stars: ✭ 50 (+72.41%)
Mutual labels:  reagent
entitydb
EntityDB library
Stars: ✭ 19 (-34.48%)
Mutual labels:  reagent
stucco
An experimental adaptive UI toolkit.
Stars: ✭ 31 (+6.9%)
Mutual labels:  reagent
compound
A micro structure for reframe data
Stars: ✭ 116 (+300%)
Mutual labels:  reagent
reagent-material-ui
Reagent wrapper for MUI (formerly Material UI) v5
Stars: ✭ 149 (+413.79%)
Mutual labels:  reagent
shadow-reagent
Starting point for ClojureScript apps with shadow-cljs, proto-repl, and reagent.
Stars: ✭ 35 (+20.69%)
Mutual labels:  reagent
shadow-firebase
shadow-cljs and firebase using google auth and persisting state to realtime database
Stars: ✭ 26 (-10.34%)
Mutual labels:  reagent
tailwind-hiccup
tailwindcss + hiccup = 👍👍
Stars: ✭ 34 (+17.24%)
Mutual labels:  reagent
reagent-shadow-cljs-starter
A minimal starter pack for Reagent-based projects
Stars: ✭ 29 (+0%)
Mutual labels:  reagent
re-alm
An Elm Architecture experiment in ClojureScript
Stars: ✭ 24 (-17.24%)
Mutual labels:  reagent
roll
RPG dice roller with both Rust CLI and ClojureScript Web interfaces
Stars: ✭ 14 (-51.72%)
Mutual labels:  reagent
nw-calculator
A crafting calculator for the New World game
Stars: ✭ 16 (-44.83%)
Mutual labels:  reagent
breaking-point
BREAKING-POINT lets you quickly define and subscribe to screen (i.e. window) breakpoints in your re-frame application
Stars: ✭ 36 (+24.14%)
Mutual labels:  reagent
re-pressed
re-pressed is a clojurescript library that handles keyboard events for re-frame applications.
Stars: ✭ 150 (+417.24%)
Mutual labels:  reagent
re-frame-http-fx-alpha
A ClojureScript client library for HTTP requests. Provides a re-frame "effect handler" keyed :http
Stars: ✭ 37 (+27.59%)
Mutual labels:  reagent
codesunaba
A simple ClojureScript code sandbox in your browser.
Stars: ✭ 18 (-37.93%)
Mutual labels:  reagent
double-bundle
Example for integrating React NPM dependencies with Clojurescript
Stars: ✭ 23 (-20.69%)
Mutual labels:  reagent

electron-app

A clj template for for an Electron application built with deps.edn, Figwheel Main, Reagent, and test integration via cljs-test-display.

Usage

clojure -A:new electron-app myname/myapp

This will generate an Electron app with a main process (source for which is located in src/main), a single renderer process (src/renderer) and unit tests for both (src/test).

Building

Before anything else, install Node dependencies:

npm install

Development

To run a development build:

clojure -A:dev

This will compile and run your Electron app, and display two windows, one containing your renderer, the other your tests displayed via clj-test-display:

Screenshot

After the application has started, you should have a REPL running, with three Figwheel sessions connected (one for the main process, one for the renderer, and one for the tests). You can see these three sessions with (conns):

cljs.user=> (conns)
Will Eval On:  Lilliana
Session Name     Age URL
Lilliana          0m /figwheel-connect
Shelia            0m /figwheel-connect
Angila            0m /figwheel-connect

And switch between them with (focus session-name).

Go ahead and make changes to your source or via the REPL and watch the UI and/or tests update in real time.

Building a Release

The main and renderer processes need to be built separately, and then packaged into an executable with electron-packager:

clojure -A:main
clojure -A:renderer
npm run package

Running tests from command line

To run tests from the command line (useful for CI builds):

clojure -A:test

Note that tests are run within an Electron process, so you will need to create a virtual display driver to run tests on a headless CI system.

License

Copyright © 2019 Paul Butcher

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].