Enable Figwheel for background and sidebar scripts in dev build
This commit is contained in:
parent
a3bc791a19
commit
d39a36988c
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ pom.xml.asc
|
||||
dist
|
||||
ext
|
||||
**/js/generated
|
||||
figwheel_server.log
|
5
Makefile
5
Makefile
@ -1,12 +1,13 @@
|
||||
dev :
|
||||
lein cljsbuild once
|
||||
mkdir -p ext
|
||||
cp -R resources/shared/* resources/dev/* ext/
|
||||
lein cljsbuild once content
|
||||
lein figwheel background sidebar
|
||||
|
||||
prod :
|
||||
lein with-profile prod cljsbuild once
|
||||
mkdir -p ext
|
||||
cp -R resources/shared/* resources/prod/* ext/
|
||||
lein with-profile prod cljsbuild once
|
||||
rm -rf ext/js/generated/out-*
|
||||
|
||||
package : clean prod
|
||||
|
35
project.clj
35
project.clj
@ -28,43 +28,46 @@
|
||||
{:cljsbuild
|
||||
{:builds
|
||||
{:background
|
||||
{:compiler {:optimizations :none
|
||||
:output-to "resources/dev/js/generated/background.js"
|
||||
:output-dir "resources/dev/js/generated/out-background"
|
||||
{:figwheel true
|
||||
:compiler {:optimizations :none
|
||||
:output-to "ext/js/generated/background.js"
|
||||
:output-dir "ext/js/generated/out-background"
|
||||
:asset-path "js/generated/out-background"
|
||||
:pretty-print true
|
||||
:source-map true}}
|
||||
:content
|
||||
{:compiler {:optimizations :whitespace
|
||||
:output-to "resources/dev/js/generated/content.js"
|
||||
:output-dir "resources/dev/js/generated/out-content"
|
||||
:output-to "ext/js/generated/content.js"
|
||||
:output-dir "ext/js/generated/out-content"
|
||||
:pretty-print true
|
||||
:source-map "resources/dev/js/generated/content.js.map"}}
|
||||
:source-map "ext/js/generated/content.js.map"}}
|
||||
:sidebar
|
||||
{:compiler {:optimizations :none
|
||||
:output-to "resources/dev/js/generated/sidebar.js"
|
||||
:output-dir "resources/dev/js/generated/out-sidebar"
|
||||
{:figwheel true
|
||||
:compiler {:optimizations :none
|
||||
:output-to "ext/js/generated/sidebar.js"
|
||||
:output-dir "ext/js/generated/out-sidebar"
|
||||
:asset-path "js/generated/out-sidebar"
|
||||
:pretty-print true
|
||||
:source-map true}}}}}]
|
||||
:source-map true}}}}
|
||||
:plugins [[lein-figwheel "0.5.14"]]}]
|
||||
:prod [:cljs-shared
|
||||
{:cljsbuild
|
||||
{:builds
|
||||
{:background
|
||||
{:compiler {:optimizations :simple
|
||||
:output-to "resources/prod/js/generated/background.js"
|
||||
:output-dir "resources/prod/js/generated/out-background"
|
||||
:output-to "ext/js/generated/background.js"
|
||||
:output-dir "ext/js/generated/out-background"
|
||||
:pretty-print false
|
||||
:source-map false}}
|
||||
:content
|
||||
{:compiler {:optimizations :simple
|
||||
:output-to "resources/prod/js/generated/content.js"
|
||||
:output-dir "resources/prod/js/generated/out-content"
|
||||
:output-to "ext/js/generated/content.js"
|
||||
:output-dir "ext/js/generated/out-content"
|
||||
:pretty-print false
|
||||
:source-map false}}
|
||||
:sidebar
|
||||
{:compiler {:optimizations :simple
|
||||
:output-to "resources/prod/js/generated/sidebar.js"
|
||||
:output-dir "resources/prod/js/generated/out-sidebar"
|
||||
:output-to "ext/js/generated/sidebar.js"
|
||||
:output-dir "ext/js/generated/out-sidebar"
|
||||
:pretty-print false
|
||||
:source-map false}}}}}]})
|
||||
|
@ -25,7 +25,7 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"content_security_policy": "script-src 'self' 'unsafe-eval' 'sha256-CfMPE8ys/ylJ5D9qKG0a9/UejrcczMr4/EmFCbVbgcc=' 'sha256-XsBu2nEJnS7x/Izq1v7dzy3Ze5myJMHvg4zukh/R1Yk=' 'sha256-AUCho1UyOpYFSZDg8EM9SYlysRIrUpQKZ7iE9CFSYfU=' 'sha256-vLlTaRFN8A2FPadIx711FwK9Ytd6LXkAzuEYAdC0D1k='; object-src 'self'",
|
||||
"content_security_policy": "script-src 'self' 'unsafe-eval' 'sha256-CfMPE8ys/ylJ5D9qKG0a9/UejrcczMr4/EmFCbVbgcc=' 'sha256-XsBu2nEJnS7x/Izq1v7dzy3Ze5myJMHvg4zukh/R1Yk=' 'sha256-AUCho1UyOpYFSZDg8EM9SYlysRIrUpQKZ7iE9CFSYfU=' 'sha256-vLlTaRFN8A2FPadIx711FwK9Ytd6LXkAzuEYAdC0D1k=' 'sha256-pGPwkltLPS11ByeZ61wzrzfELAOibrYCIFYF/TaXVdk='; object-src 'self'",
|
||||
"permissions": ["tabs", "https://hn.algolia.com/*"],
|
||||
"web_accessible_resources": ["sidebar.html", "js/*.map", "js/generated/*.map", "js/generated/out/*"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user