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! >!