mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -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,12 +7,13 @@
|
||||||
|
|
||||||
(ra/start-figwheel!
|
(ra/start-figwheel!
|
||||||
{:figwheel-options {:css-dirs ["resources/public/css"]}
|
{:figwheel-options {:css-dirs ["resources/public/css"]}
|
||||||
:build-ids ["dev" "worker"]
|
:build-ids ["dev"]
|
||||||
:all-builds
|
:all-builds
|
||||||
[{:id "dev"
|
[{:id "dev"
|
||||||
:figwheel {:on-jsload "uxbox.ui/init"}
|
:figwheel {:on-jsload "uxbox.ui/init"}
|
||||||
:source-paths ["src" "vendor"]
|
:source-paths ["src" "vendor"]
|
||||||
:compiler {:main 'uxbox.core
|
:compiler
|
||||||
|
{:main 'uxbox.core
|
||||||
:asset-path "js"
|
:asset-path "js"
|
||||||
:parallel-build false
|
:parallel-build false
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
|
@ -24,20 +25,6 @@
|
||||||
:language-out :ecmascript5
|
:language-out :ecmascript5
|
||||||
:output-to "resources/public/js/main.js"
|
:output-to "resources/public/js/main.js"
|
||||||
:output-dir "resources/public/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}}]})
|
:verbose true}}]})
|
||||||
|
|
||||||
(ra/cljs-repl "dev")
|
(ra/cljs-repl "dev")
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
(require '[cljs.build.api :as b])
|
(require '[cljs.build.api :as b])
|
||||||
|
|
||||||
(b/watch
|
(b/watch
|
||||||
(b/inputs "vendor" "dev")
|
(b/inputs "dev" "vendor")
|
||||||
{:main 'bench.core
|
{:main 'bench.core
|
||||||
:output-to "out/bench.js"
|
:output-to "out/bench.js"
|
||||||
:output-dir "out"
|
:output-dir "out"
|
||||||
:parallel-build false
|
:parallel-build false
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:pretty-print true
|
:static-fns true
|
||||||
:target :nodejs
|
:target :nodejs
|
||||||
:language-in :ecmascript6
|
:language-in :ecmascript6
|
||||||
:language-out :ecmascript5
|
:language-out :ecmascript5
|
||||||
|
:pretty-print true
|
||||||
:verbose 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