Skip to content

Commit

Permalink
fix(electron): some but not all warnings gone (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjeff0 authored Aug 21, 2020
1 parent 8f5cc55 commit d414f59
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
# publish_dir: ./resources/public

dist:
if: github.event_name == 'push'
runs-on: ${{ matrix.os }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -211,5 +212,4 @@ jobs:
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: "-p always"

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "athens",
"author": "athensresearch",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Open-Source Networked Thought",
"main": "resources/main.js",
"build": {
Expand Down
3 changes: 2 additions & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
:modules {:renderer {:init-fn athens.core/init}}

:compiler-options {:closure-warnings {:global-this :off}
:infer-externs :auto
:closure-defines {re-frame.trace.trace-enabled? true}}

:devtools {:preloads [devtools.preload
day8.re-frame.trace.preload]}}
day8.re-frame-10x.preload]}}

:main {:target :node-script
:output-to "resources/main.js"
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/athens/listeners.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

(defn copy
"If blocks are selected, copy blocks as markdown list."
[e]
[^js e]
(let [blocks @(subscribe [:selected/items])]
(when (not-empty blocks)
(.. e preventDefault)
Expand All @@ -155,7 +155,7 @@

;; do same as copy AND delete selected blocks
(defn cut
[e]
[^js e]
(let [blocks @(subscribe [:selected/items])]
(when (not-empty blocks)
(.. e preventDefault)
Expand Down
9 changes: 6 additions & 3 deletions src/cljs/athens/main/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(defn send-status-to-window
[text]
(.. log (info text))
(.. @main-window -webContents (send text)))
(.. ^js @main-window -webContents (send text)))


(defn init-browser
Expand All @@ -28,11 +28,14 @@
(clj->js {:width 800
:height 600
:autoHideMenuBar true
:enableRemoteModule true
:webPreferences {:nodeIntegration true
:worldSafeExecuteJavaScript true
:enableRemoteModule true
:nodeIntegrationWorker true}})))
; Path is relative to the compiled js file (main.js in our case)
(.loadURL @main-window (str "file://" js/__dirname "/public/index.html"))
(.on @main-window "closed" #(reset! main-window nil)))
(.loadURL ^js @main-window (str "file://" js/__dirname "/public/index.html"))
(.on ^js @main-window "closed" #(reset! main-window nil)))


(defn init-updater
Expand Down

0 comments on commit d414f59

Please sign in to comment.