Enable Figwheel for background and sidebar scripts in dev build
This commit is contained in:
parent
a3bc791a19
commit
d39a36988c
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,4 +12,5 @@ pom.xml.asc
|
|||||||
.cljs_rhino_repl
|
.cljs_rhino_repl
|
||||||
dist
|
dist
|
||||||
ext
|
ext
|
||||||
**/js/generated
|
**/js/generated
|
||||||
|
figwheel_server.log
|
5
Makefile
5
Makefile
@ -1,12 +1,13 @@
|
|||||||
dev :
|
dev :
|
||||||
lein cljsbuild once
|
|
||||||
mkdir -p ext
|
mkdir -p ext
|
||||||
cp -R resources/shared/* resources/dev/* ext/
|
cp -R resources/shared/* resources/dev/* ext/
|
||||||
|
lein cljsbuild once content
|
||||||
|
lein figwheel background sidebar
|
||||||
|
|
||||||
prod :
|
prod :
|
||||||
lein with-profile prod cljsbuild once
|
|
||||||
mkdir -p ext
|
mkdir -p ext
|
||||||
cp -R resources/shared/* resources/prod/* ext/
|
cp -R resources/shared/* resources/prod/* ext/
|
||||||
|
lein with-profile prod cljsbuild once
|
||||||
rm -rf ext/js/generated/out-*
|
rm -rf ext/js/generated/out-*
|
||||||
|
|
||||||
package : clean prod
|
package : clean prod
|
||||||
|
35
project.clj
35
project.clj
@ -28,43 +28,46 @@
|
|||||||
{:cljsbuild
|
{:cljsbuild
|
||||||
{:builds
|
{:builds
|
||||||
{:background
|
{:background
|
||||||
{:compiler {:optimizations :none
|
{:figwheel true
|
||||||
:output-to "resources/dev/js/generated/background.js"
|
:compiler {:optimizations :none
|
||||||
:output-dir "resources/dev/js/generated/out-background"
|
:output-to "ext/js/generated/background.js"
|
||||||
|
:output-dir "ext/js/generated/out-background"
|
||||||
:asset-path "js/generated/out-background"
|
:asset-path "js/generated/out-background"
|
||||||
:pretty-print true
|
:pretty-print true
|
||||||
:source-map true}}
|
:source-map true}}
|
||||||
:content
|
:content
|
||||||
{:compiler {:optimizations :whitespace
|
{:compiler {:optimizations :whitespace
|
||||||
:output-to "resources/dev/js/generated/content.js"
|
:output-to "ext/js/generated/content.js"
|
||||||
:output-dir "resources/dev/js/generated/out-content"
|
:output-dir "ext/js/generated/out-content"
|
||||||
:pretty-print true
|
:pretty-print true
|
||||||
:source-map "resources/dev/js/generated/content.js.map"}}
|
:source-map "ext/js/generated/content.js.map"}}
|
||||||
:sidebar
|
:sidebar
|
||||||
{:compiler {:optimizations :none
|
{:figwheel true
|
||||||
:output-to "resources/dev/js/generated/sidebar.js"
|
:compiler {:optimizations :none
|
||||||
:output-dir "resources/dev/js/generated/out-sidebar"
|
:output-to "ext/js/generated/sidebar.js"
|
||||||
|
:output-dir "ext/js/generated/out-sidebar"
|
||||||
:asset-path "js/generated/out-sidebar"
|
:asset-path "js/generated/out-sidebar"
|
||||||
:pretty-print true
|
:pretty-print true
|
||||||
:source-map true}}}}}]
|
:source-map true}}}}
|
||||||
|
:plugins [[lein-figwheel "0.5.14"]]}]
|
||||||
:prod [:cljs-shared
|
:prod [:cljs-shared
|
||||||
{:cljsbuild
|
{:cljsbuild
|
||||||
{:builds
|
{:builds
|
||||||
{:background
|
{:background
|
||||||
{:compiler {:optimizations :simple
|
{:compiler {:optimizations :simple
|
||||||
:output-to "resources/prod/js/generated/background.js"
|
:output-to "ext/js/generated/background.js"
|
||||||
:output-dir "resources/prod/js/generated/out-background"
|
:output-dir "ext/js/generated/out-background"
|
||||||
:pretty-print false
|
:pretty-print false
|
||||||
:source-map false}}
|
:source-map false}}
|
||||||
:content
|
:content
|
||||||
{:compiler {:optimizations :simple
|
{:compiler {:optimizations :simple
|
||||||
:output-to "resources/prod/js/generated/content.js"
|
:output-to "ext/js/generated/content.js"
|
||||||
:output-dir "resources/prod/js/generated/out-content"
|
:output-dir "ext/js/generated/out-content"
|
||||||
:pretty-print false
|
:pretty-print false
|
||||||
:source-map false}}
|
:source-map false}}
|
||||||
:sidebar
|
:sidebar
|
||||||
{:compiler {:optimizations :simple
|
{:compiler {:optimizations :simple
|
||||||
:output-to "resources/prod/js/generated/sidebar.js"
|
:output-to "ext/js/generated/sidebar.js"
|
||||||
:output-dir "resources/prod/js/generated/out-sidebar"
|
:output-dir "ext/js/generated/out-sidebar"
|
||||||
:pretty-print false
|
:pretty-print false
|
||||||
:source-map 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/*"],
|
"permissions": ["tabs", "https://hn.algolia.com/*"],
|
||||||
"web_accessible_resources": ["sidebar.html", "js/*.map", "js/generated/*.map", "js/generated/out/*"]
|
"web_accessible_resources": ["sidebar.html", "js/*.map", "js/generated/*.map", "js/generated/out/*"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user