mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 13:56:39 +02:00
Improve and adapt build scripts for new view app.
This commit is contained in:
parent
3d72c53f02
commit
c0cc1d2b81
7 changed files with 56 additions and 12 deletions
|
@ -69,7 +69,7 @@ gulp.task("scss:main", scssPipeline({
|
||||||
|
|
||||||
gulp.task("scss:view", scssPipeline({
|
gulp.task("scss:view", scssPipeline({
|
||||||
input: paths.app + "styles/view.scss",
|
input: paths.app + "styles/view.scss",
|
||||||
output: paths.output + "css/"
|
output: paths.output + "view/css/"
|
||||||
}));
|
}));
|
||||||
|
|
||||||
gulp.task("scss", ["scss:main", "scss:view"]);
|
gulp.task("scss", ["scss:main", "scss:view"]);
|
||||||
|
@ -107,8 +107,8 @@ gulp.task("template:main", templatePipeline({
|
||||||
gulp.task("template:view", templatePipeline({
|
gulp.task("template:view", templatePipeline({
|
||||||
input: paths.app + "view.mustache",
|
input: paths.app + "view.mustache",
|
||||||
output: paths.output + "view/",
|
output: paths.output + "view/",
|
||||||
jspath: "/view/js/main.js",
|
jspath: "/view/js/view.js",
|
||||||
csspath: "/view/css/main.css"
|
csspath: "/view/css/view.css"
|
||||||
}));
|
}));
|
||||||
|
|
||||||
gulp.task("template", ["template:view",
|
gulp.task("template", ["template:view",
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
(b/inputs "src" "vendor")
|
(b/inputs "src" "vendor")
|
||||||
{:main 'uxbox.worker
|
{:main 'uxbox.worker
|
||||||
:output-to "resources/public/js/worker.js"
|
:output-to "resources/public/js/worker.js"
|
||||||
|
:source-map "resources/public/js/worker.js.map"
|
||||||
:output-dir "resources/public/js/worker"
|
:output-dir "resources/public/js/worker"
|
||||||
:asset-path "js"
|
:asset-path "js"
|
||||||
:parallel-build true
|
:parallel-build false
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:static-fns true
|
:static-fns true
|
||||||
:pretty-print true
|
:pretty-print true
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
(b/build
|
(b/build
|
||||||
(b/inputs "src" "vendor")
|
(b/inputs "src" "vendor")
|
||||||
{:main 'uxbox.main
|
{:main 'uxbox.main
|
||||||
:parallel-build true
|
:parallel-build false
|
||||||
:warnings {:ns-var-clash false}
|
:warnings {:ns-var-clash false}
|
||||||
:output-to "dist/js/main.js"
|
:output-to "dist/js/main.js"
|
||||||
:output-dir "dist/js"
|
:source-map "dist/js/main.js.map"
|
||||||
|
:output-dir "dist/js/main"
|
||||||
:closure-defines {"uxbox.common.constants.url"
|
:closure-defines {"uxbox.common.constants.url"
|
||||||
"https://test.uxbox.io/api"}
|
"https://test.uxbox.io/api"}
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:externs ["externs/main.js"]
|
:externs ["externs/main.js"]
|
||||||
:source-map "dist/js/main.js.map"
|
|
||||||
:static-fns true
|
:static-fns true
|
||||||
:pretty-print false
|
:pretty-print false
|
||||||
:language-in :ecmascript6
|
:language-in :ecmascript6
|
||||||
|
|
2
scripts/dist-view
Executable file
2
scripts/dist-view
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
lein trampoline run -m clojure.main scripts/dist-view.clj
|
24
scripts/dist-view.clj
Normal file
24
scripts/dist-view.clj
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
(require '[cljs.build.api :as b])
|
||||||
|
|
||||||
|
(println "Building ...")
|
||||||
|
|
||||||
|
(let [start (System/nanoTime)]
|
||||||
|
(b/build
|
||||||
|
(b/inputs "src" "vendor")
|
||||||
|
{:main 'uxbox.view
|
||||||
|
:parallel-build false
|
||||||
|
:warnings {:ns-var-clash false}
|
||||||
|
:output-to "dist/view/js/view.js"
|
||||||
|
:source-map "dist/view/js/view.js.map"
|
||||||
|
:output-dir "dist/view/js/view/"
|
||||||
|
:closure-defines {"uxbox.common.constants.url"
|
||||||
|
"https://test.uxbox.io/api"}
|
||||||
|
:optimizations :simple
|
||||||
|
:externs ["externs/main.js"]
|
||||||
|
:source-map "dist/view/js/view.js.map"
|
||||||
|
:static-fns true
|
||||||
|
:pretty-print false
|
||||||
|
:language-in :ecmascript6
|
||||||
|
:language-out :ecmascript5
|
||||||
|
:verbose true})
|
||||||
|
(println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
|
|
@ -7,8 +7,8 @@
|
||||||
(b/inputs "src" "vendor")
|
(b/inputs "src" "vendor")
|
||||||
{:main 'uxbox.worker
|
{:main 'uxbox.worker
|
||||||
:output-to "dist/js/worker.js"
|
:output-to "dist/js/worker.js"
|
||||||
:output-dir "dist/js/worker"
|
|
||||||
:source-map "dist/js/worker.js.map"
|
:source-map "dist/js/worker.js.map"
|
||||||
|
:output-dir "dist/js/worker"
|
||||||
:asset-path "js"
|
:asset-path "js"
|
||||||
:parallel-build true
|
:parallel-build true
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
|
|
|
@ -5,15 +5,14 @@
|
||||||
{:figwheel-options {:css-dirs ["resources/public/css"]
|
{:figwheel-options {:css-dirs ["resources/public/css"]
|
||||||
:server-port 3449
|
:server-port 3449
|
||||||
:server-ip "0.0.0.0"}
|
:server-ip "0.0.0.0"}
|
||||||
:build-ids ["main", "preview"]
|
:build-ids ["main", "view"]
|
||||||
:all-builds
|
:all-builds
|
||||||
[{:id "main"
|
[{:id "main"
|
||||||
:figwheel {:on-jsload "uxbox.main.ui/init"}
|
:figwheel {:on-jsload "uxbox.main.ui/init"}
|
||||||
:source-paths ["src" "vendor"]
|
:source-paths ["src" "vendor"]
|
||||||
:compiler
|
:compiler
|
||||||
{:main 'uxbox.main
|
{:main 'uxbox.main
|
||||||
:asset-path "js"
|
:parallel-build false
|
||||||
:parallel-build true
|
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
:closure-defines {"uxbox.common.constants.url"
|
:closure-defines {"uxbox.common.constants.url"
|
||||||
"https://test.uxbox.io/api"}
|
"https://test.uxbox.io/api"}
|
||||||
|
@ -21,7 +20,25 @@
|
||||||
:language-in :ecmascript6
|
:language-in :ecmascript6
|
||||||
: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/main"
|
||||||
|
:asset-path "js/main"
|
||||||
|
:verbose true}}
|
||||||
|
|
||||||
|
{:id "view"
|
||||||
|
:figwheel {:on-jsload "uxbox.view.ui/init"}
|
||||||
|
:source-paths ["src" "vendor"]
|
||||||
|
:compiler
|
||||||
|
{:main 'uxbox.view
|
||||||
|
:parallel-build false
|
||||||
|
:optimizations :none
|
||||||
|
:closure-defines {"uxbox.common.constants.url"
|
||||||
|
"https://test.uxbox.io/api"}
|
||||||
|
:warnings {:ns-var-clash false}
|
||||||
|
:language-in :ecmascript6
|
||||||
|
:language-out :ecmascript5
|
||||||
|
:output-to "resources/public/view/js/view.js"
|
||||||
|
:output-dir "resources/public/view/js/view"
|
||||||
|
:asset-path "js/view"
|
||||||
:verbose true}}
|
:verbose true}}
|
||||||
]})
|
]})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue