From 20ac362a4167844331b86528e706a94ef69f0a28 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 11 Jan 2018 20:15:05 -0500 Subject: [PATCH] Add popup script --- ext/manifest.json | 6 +++++- project.clj | 11 ++++++++--- src/looped_in/{main.cljs => background.cljs} | 8 +++++--- src/looped_in/popup.cljs | 4 ++++ 4 files changed, 22 insertions(+), 7 deletions(-) rename src/looped_in/{main.cljs => background.cljs} (94%) create mode 100644 src/looped_in/popup.cljs diff --git a/ext/manifest.json b/ext/manifest.json index 3867329..b89cf1f 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -10,7 +10,11 @@ "128": "icons/icon128.png" }, "background": { - "scripts": ["js/browser-polyfill.min.js", "js/generated/main.js"] + "scripts": [ + "js/browser-polyfill.min.js", + "js/generated/out/cljs_base.js", + "js/generated/background.js" + ] }, "browser_action": { "default_icon": "icons/icon48.png", diff --git a/project.clj b/project.clj index d008910..0363001 100644 --- a/project.clj +++ b/project.clj @@ -12,6 +12,11 @@ :cljsbuild {:builds [{:source-paths ["src"] :compiler {:optimizations :simple :pretty-print true - :output-to "ext/js/generated/main.js" - :source-map "ext/js/generated/main.js.map" - :output-dir "ext/js/generated/out"}}]}) + :source-map true + :output-dir "ext/js/generated/out" + :modules {:background + {:output-to "ext/js/generated/background.js" + :entries #{"looped-in.background"}} + :popup + {:output-to "ext/js/generated/popup.js" + :entries #{"looped-in.popup"}}}}}]}) diff --git a/src/looped_in/main.cljs b/src/looped_in/background.cljs similarity index 94% rename from src/looped_in/main.cljs rename to src/looped_in/background.cljs index c636f0b..d373021 100644 --- a/src/looped_in/main.cljs +++ b/src/looped_in/background.cljs @@ -1,4 +1,4 @@ -(ns looped-in.main +(ns looped-in.background (:require [clojure.core.match :refer [match]] [cljs.core.async :refer [go go-loop chan close! >!