karad / lein_template_descjop Goto Github PK
View Code? Open in Web Editor NEWA Leiningen template(Clojure/ClojureScript Project) for Web based desktop application with Electron (atom-shell).
Home Page: http://descjop.org
A Leiningen template(Clojure/ClojureScript Project) for Web based desktop application with Electron (atom-shell).
Home Page: http://descjop.org
github repogitory moved atom/atom-shell -> atom/electon...
Hello, and thank you for your efforts )
Is there a way to get repl for electron main process?
Hello @karad ,
I was trying out this template, it's really promising for my use case but I ran into the following error at almost the final step.
descjop1 git/master* 72s
❯ lein descjop-figwheel
Figwheel: Cutting some fruit, just a sec ...
Retrieving figwheel-sidecar/figwheel-sidecar/0.5.9/figwheel-sidecar-0.5.9.pom from clojars
Retrieving hawk/hawk/0.2.11/hawk-0.2.11.pom from clojars
Retrieving strictly-specking-standalone/strictly-specking-standalone/0.1.1/strictly-specking-standalone-0.1.1.pom from clojars
Retrieving figwheel-sidecar/figwheel-sidecar/0.5.9/figwheel-sidecar-0.5.9.jar from clojars
Retrieving hawk/hawk/0.2.11/hawk-0.2.11.jar from clojars
Retrieving strictly-specking-standalone/strictly-specking-standalone/0.1.1/strictly-specking-standalone-0.1.1.jar from clojars
Exception in thread "main" clojure.lang.ExceptionInfo: Call to clojure.core/refer-clojure did not conform to spec:
In: [2 1] val: :as fails at: [:args :exclude :op :quoted-spec :spec] predicate: #{:exclude}
In: [2 1] val: :as fails at: [:args :only :op :quoted-spec :spec] predicate: #{:only}
In: [2 1] val: :as fails at: [:args :rename :op :quoted-spec :spec] predicate: #{:rename}
In: [2] val: (quote :as) fails at: [:args :exclude :op :spec] predicate: #{:exclude}
In: [2] val: (quote :as) fails at: [:args :only :op :spec] predicate: #{:only}
In: [2] val: (quote :as) fails at: [:args :rename :op :spec] predicate: #{:rename}
:clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__1200 0x55c14260 "clojure.spec.alpha$regex_spec_impl$reify__1200@55c14260"]
:clojure.spec.alpha/value ((quote :exclude) (quote [reduce transduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core))
:clojure.spec.alpha/args ((quote :exclude) (quote [reduce transduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core))
#:clojure.spec.alpha{:problems ({:path [:args :exclude :op :spec], :pred #{:exclude}, :val (quote :as), :via [], :in [2]} {:path [:args :exclude :op :quoted-spec :spec], :pred #{:exclude}, :val :as, :via [], :in [2 1]} {:path [:args :only :op :spec], :pred #{:only}, :val (quote :as), :via [], :in [2]} {:path [:args :only :op :quoted-spec :spec], :pred #{:only}, :val :as, :via [], :in [2 1]} {:path [:args :rename :op :spec], :pred #{:rename}, :val (quote :as), :via [], :in [2]} {:path [:args :rename :op :quoted-spec :spec], :pred #{:rename}, :val :as, :via [], :in [2 1]}), :spec #object[clojure.spec.alpha$regex_spec_impl$reify__1200 0x55c14260 "clojure.spec.alpha$regex_spec_impl$reify__1200@55c14260"], :value ((quote :exclude) (quote [reduce transduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core)), :args ((quote :exclude) (quote [reduce transduce into merge map take partition partition-by bounded-count]) (quote :as) (quote core))}, compiling:(clojure/core/async.clj:9:1)
Could you please help me out?
We got through all the steps untill it comes to packaging:
lein descjop-uberapp-osx
java.io.IOException: Cannot run program "cmd.exe" (in directory ....
This is invoked on MacOS 10.12.
Many of the dependencies are now a long way behind and could do with an update. I would send a pull request but am hitting build issues after upgrade.
Hey, I think there is a subtle bug in the profile dev init files.
The :jsload-callback
(effectively) calls core/init!
; however, it should instead call core/mount-root
. This is an important distinction, because the core/init!
function should run things once when the application first loads, and core/mount-root
should be called every time figwheel reloads.
:jsload-callback should instead call mount-root
:
https://github.com/karad/lein_template_descjop/blob/master/resources/leiningen/new/descjop/reagent__src__front__core.cljs#L10
return "" (.resolve path "")
code.
need change
(.loadUrl @*win* (str "file://" (.resolve path "") "/app/index.html"))
to
(.loadUrl @*win* (str "file://" (.resolve path (js* "__dirname") "../index.html")))
update electron 0.25.3 -> 0.26.0
Hi m8, I was wondering if it would be possible to add a local sqlite db in the template, and how this could be possible.
I'm not sure if it's meant to do this, but using a clean install of 0.5.2 project for both om and reagent give the results:
"X" does not work.
in the electron application when started (where X is "Om" for the om project, "Reagent" for the reagent project).
I'm on Mac OS/X.
Also, I'm firing up the figwheel listener as recommended using "lein trampoline figwheel frontend" which starts the autobuilder and says "Prompt will show when figwheel connects to your application", but I don't know how to get it to do that.
Going to "http://localhost:3449/index.html" gives "Cannot find:/index.html", presumably because of the figwheel_middleware.clj handler always returns a 404.
I think what I'm missing and what would be usefully documented are the next steps from a basic install for:
Sorry for all the questions, but I'm still trying to piece together the parts and their interaction, plus because I'm getting "X does not work", i'm not sure if it's because I'm missing the next step, or the setup is broken, and how to go about fixing it.
It would be useful to be able to specify a specific version of Electron to target, perhaps via configuration settings in project.clj. This would allow developers to control this and get you out of the business of releasing updates whenever a new version of Electron is released.
Hi there, thanks for sharing this template,
I was able to create a re-frame helloworld / pomodoro app in a couple of hours without knowing much about electron, so thanks!
Could you provide details about the project structure?
As far as I understand there's a piece of node code src/project/core.cljs
and a piece of html + js code app/.../index.html
+ src_front/...
.
When the electron framework starts, the node server will run the nodejs code. The nodejs code will create the windows that display & run the html pages.
What about creating new windows? How do you communicate between the client and the server?
The goog.require() has not the namespace transformed in Javascript standard.
I have a go-bang.core instead of go_bang.core.
Change in the string makes the app working perfectly ;)
https://github.com/karad/lein_template_descjop/blob/master/resources/leiningen/new/descjop/reagent__app__index.html#L16
{{name}} should be changed by {{santitized}} ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.