1. path to leo-app is 'app/dev/' not 'app/'. This is the reason that electron could not find it. 2. in order to use get-leo-doc function you first need to enter leo-front/core name space by issuing (in-ns 'leo-front/core) I have noticed that on my machine after this command I can execute functions from leo_front/core.cljs and access data fields defined there, but lein gives me result and also warning. I don't remember if there should be anything else perhaps once (require '[leo-front/core]) or something to get rid of these warnings, but code is executed and results are printed in the console.
On Sunday, February 18, 2018 at 3:35:22 PM UTC+1, Edward K. Ream wrote: > > On Sunday, February 18, 2018 at 3:43:00 AM UTC-6, vitalije wrote: > > Thanks for this. Here are my notes as I go along: > > I have found what the commands I have used. First you need to start build >> process in one terminal using >> lein descjop-figwheel >> > > EKR: Apparently the second process continued even though I had killed its > console hours earlier! I restarted my Windows 10 machine and re-ran lein > descjop-figwheel from leo/proto/Vitalije/leocljs. Now I get what I got > hours earlier: > > Results: Stored in vars *1, *2, *3, *e holds last exception object > Prompt will show when Figwheel connects to your application > > > Vitalije: Once you have started build process, open new terminal in > prototype folder and start the electron application like this: > ./electron/electron app/dev/ > > V: On Windows it maybe that you need `.\electron\electron.exe app/dev`. > > EKR: Electron is on my path. Running it brings up a window that says: > > To run your app with Electron, execute the following command in your > Console (or Terminal): > > C:\Users\edreamleo\AppData\Roaming\npm\node_modules\electron\dist\electron.exe > path-to-your-app > > > Actually, electron.bat is on my path. It contains just: > > C:\Users\edreamleo\AppData\Roaming\npm\electron %* > > So it should work. The electron window also says "Or you can drag here to > run it" > > Either way, I get an error dialog: can't find an Electron App at ..\app > > Hmm. I have an old version of the \app folder, which I may have built > differently. When I drag *it* to the electron window I get an uncaught > exception dialog whose first line is: > > Error: Cannot find module './clsbuild-main > > V: This should open electron application and show body to the right and > tree to the left. After first click in tree, tree is painted first time. > > Also Leo file being opened should be placed in `app/dev/` folder. > > In src_front/leo_front/core.cljs file at line 379 is command > (get-leo-doc "line-numbering.leo") > > EKR: Now I *do *see the prompt in the first window: > > dev-front:cljs.user=> (get-leo-doc "line-numbering.leo") > > And I get an error: Use of undeclared Var cljs.user/get-leo-doc > > V: change "line-numbering.leo" to match the Leo file you have placed in > app/dev/. > > EKR: I copied LeoDocs.leo to app/dev. But now the first console is > frozen. Time to reboot. > > Back in a minute. > > > > After electron application has started, in first terminal (* in build > process) there should be open clojurescript shell where you can write > clojurescript commands and have them executed live in electron app. > > Usually you start with: > (in-ns 'leo-front/core) > > to enter inside leo-front/core module. There you have all defined > functions, data fields at your disposal. You can play with app-state to > check what data it contains or to change some data and see how ui reacts. > > Vitalije > > > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
