0
Fork 0
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:
Andrey Antukh 2016-04-11 17:31:14 +03:00
parent 94fc4d2b88
commit 8916a9b7ac
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
8 changed files with 56 additions and 46 deletions

View file

@ -1,2 +0,0 @@
#!/bin/sh
lein trampoline run -m clojure.main scripts/build-bench.clj

View file

@ -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
View file

@ -0,0 +1,2 @@
#!/bin/sh
lein trampoline run -m clojure.main scripts/build-worker.clj

18
scripts/build-worker.clj Normal file
View 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"))

View file

@ -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")

View file

@ -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
View file

@ -0,0 +1,2 @@
#!/bin/sh
lein trampoline run -m clojure.main scripts/watch-worker.clj

15
scripts/watch-worker.clj Normal file
View 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})