mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
Fix build scripts (related to webworker).
This commit is contained in:
parent
94fc4d2b88
commit
8916a9b7ac
8 changed files with 56 additions and 46 deletions
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
lein trampoline run -m clojure.main scripts/build-bench.clj
|
|
@ -1,13 +0,0 @@
|
|||
(require '[cljs.build.api :as b])
|
||||
|
||||
(b/build
|
||||
(b/inputs "vendor" "dev")
|
||||
{:main 'bench.core
|
||||
:output-to "out/bench.js"
|
||||
:output-dir "out"
|
||||
:parallel-build false
|
||||
:optimizations :simple
|
||||
:language-in :ecmascript5
|
||||
:language-out :ecmascript5
|
||||
:target :nodejs
|
||||
:verbose true})
|
2
scripts/build-worker
Executable file
2
scripts/build-worker
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
lein trampoline run -m clojure.main scripts/build-worker.clj
|
18
scripts/build-worker.clj
Normal file
18
scripts/build-worker.clj
Normal file
|
@ -0,0 +1,18 @@
|
|||
(require '[cljs.build.api :as b])
|
||||
|
||||
(println "Building ...")
|
||||
|
||||
(let [start (System/nanoTime)]
|
||||
(b/build
|
||||
(b/inputs "src" "vendor")
|
||||
{:main 'uxbox.worker
|
||||
:output-to "resources/public/js/worker.js"
|
||||
:output-dir "resources/public/js/worker"
|
||||
:asset-path "js"
|
||||
:parallel-build false
|
||||
:optimizations :simple
|
||||
:static-fns true
|
||||
:language-in :ecmascript5
|
||||
:language-out :ecmascript5
|
||||
:verbose true})
|
||||
(println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
|
|
@ -7,37 +7,24 @@
|
|||
|
||||
(ra/start-figwheel!
|
||||
{:figwheel-options {:css-dirs ["resources/public/css"]}
|
||||
:build-ids ["dev" "worker"]
|
||||
:build-ids ["dev"]
|
||||
:all-builds
|
||||
[{:id "dev"
|
||||
:figwheel {:on-jsload "uxbox.ui/init"}
|
||||
:source-paths ["src" "vendor"]
|
||||
:compiler {:main 'uxbox.core
|
||||
:asset-path "js"
|
||||
:parallel-build false
|
||||
:optimizations :none
|
||||
:closure-defines {"uxbox.repo.core.url"
|
||||
"https://test.uxbox.io/api"}
|
||||
:warnings {:ns-var-clash false}
|
||||
:pretty-print true
|
||||
:language-in :ecmascript6
|
||||
:language-out :ecmascript5
|
||||
:output-to "resources/public/js/main.js"
|
||||
:output-dir "resources/public/js"
|
||||
:verbose true}}
|
||||
|
||||
{:id "worker"
|
||||
:source-paths ["src" "vendor"]
|
||||
:compiler {:main 'uxbox.worker
|
||||
:asset-path "js"
|
||||
:parallel-build false
|
||||
:optimizations :simple
|
||||
:warnings {:ns-var-clash false}
|
||||
:pretty-print true
|
||||
:static-fns true
|
||||
:language-in :ecmascript6
|
||||
:language-out :ecmascript5
|
||||
:output-to "resources/public/js/worker.js"
|
||||
:verbose true}}]})
|
||||
:compiler
|
||||
{:main 'uxbox.core
|
||||
:asset-path "js"
|
||||
:parallel-build false
|
||||
:optimizations :none
|
||||
:closure-defines {"uxbox.repo.core.url"
|
||||
"https://test.uxbox.io/api"}
|
||||
:warnings {:ns-var-clash false}
|
||||
:pretty-print true
|
||||
:language-in :ecmascript6
|
||||
:language-out :ecmascript5
|
||||
:output-to "resources/public/js/main.js"
|
||||
:output-dir "resources/public/js"
|
||||
:verbose true}}]})
|
||||
|
||||
(ra/cljs-repl "dev")
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
(require '[cljs.build.api :as b])
|
||||
|
||||
(b/watch
|
||||
(b/inputs "vendor" "dev")
|
||||
(b/inputs "dev" "vendor")
|
||||
{:main 'bench.core
|
||||
:output-to "out/bench.js"
|
||||
:output-dir "out"
|
||||
:parallel-build false
|
||||
:optimizations :simple
|
||||
:pretty-print true
|
||||
:optimizations :simple
|
||||
:static-fns true
|
||||
:target :nodejs
|
||||
:language-in :ecmascript6
|
||||
:language-out :ecmascript5
|
||||
:pretty-print true
|
||||
:verbose true})
|
||||
|
|
2
scripts/watch-worker
Executable file
2
scripts/watch-worker
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
lein trampoline run -m clojure.main scripts/watch-worker.clj
|
15
scripts/watch-worker.clj
Normal file
15
scripts/watch-worker.clj
Normal file
|
@ -0,0 +1,15 @@
|
|||
(require '[cljs.build.api :as b])
|
||||
|
||||
(b/watch
|
||||
(b/inputs "src" "vendor")
|
||||
{:main 'uxbox.worker
|
||||
:output-to "resources/public/js/worker.js"
|
||||
:output-dir "resources/public/js/worker"
|
||||
:asset-path "js"
|
||||
:parallel-build false
|
||||
:optimizations :simple
|
||||
:static-fns true
|
||||
:language-in :ecmascript6
|
||||
:language-out :ecmascript5
|
||||
:pretty-print true
|
||||
:verbose true})
|
Loading…
Add table
Reference in a new issue