Organize extension javascript structure

This commit is contained in:
Jeremy Dormitzer 2018-01-10 10:34:42 -05:00
parent fcaf8b57d7
commit 1b60bd014a
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320
5 changed files with 11 additions and 11 deletions

4
.gitignore vendored
View File

@ -9,6 +9,4 @@ pom.xml.asc
/.nrepl-port
.hgignore
.hg/
out/
ext/content.js*
ext/background.js*
ext/js/generated/

View File

@ -13,19 +13,21 @@
{
"matches": ["<all_urls>"],
"js": [
"browser-polyfill.min.js",
"out/cljs_base.js",
"content.js"
"js/browser-polyfill.min.js",
"js/generated/out/cljs_base.js",
"js/generated/content.js"
]
}
],
"background": {
"scripts": ["browser-polyfill.min.js", "out/cljs_base.js", "background.js"]
"scripts": ["js/browser-polyfill.min.js",
"js/generated/out/cljs_base.js",
"js/generated/background.js"]
},
"browser_action": {
"default_icon": "icons/icon48.png",
"default_title": "Looped In"
},
"content_security_policy": "script-src 'self'; object-src 'self'; connect-src 'self' https://hn.algolia.com",
"web_accessible_resources": ["*.map"]
"web_accessible_resources": ["js/*.map", "js/generated/*.map"]
}

View File

@ -5,8 +5,8 @@
(cljs/build "src_cljs" {:optimizations :simple
:source-map true
:pretty-print true
:output-dir "ext/out"
:modules {:content {:output-to "ext/content.js"
:output-dir "ext/js/generated/out"
:modules {:content {:output-to "ext/js/generated/content.js"
:entries #{"looped-in.content"}}
:background {:output-to "ext/background.js"
:background {:output-to "ext/js/generated/background.js"
:entries #{"looped-in.background"}}}}))