mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -05:00
607deb31dc
Mainly leave shadow-cljs for build cljs stuff and use esbuild for bundle all js dependencies, completly avoiding all possible incompatibility issues between js libraries and google closure compiler.
207 lines
5.1 KiB
Clojure
207 lines
5.1 KiB
Clojure
{:deps {:aliases [:dev]}
|
|
:http {:port 3448}
|
|
:nrepl {:port 3447 :host "0.0.0.0"}
|
|
:dev-http {8888 "classpath:public"}
|
|
|
|
:builds
|
|
{:main
|
|
{:target :browser
|
|
:output-dir "resources/public/js/"
|
|
:asset-path "/js"
|
|
:devtools {:browser-inject :main
|
|
:watch-dir "resources/public"
|
|
:reload-strategy :full}
|
|
:build-options {:manifest-name "manifest.json"}
|
|
:module-loader true
|
|
:modules
|
|
{:shared
|
|
{:entries []}
|
|
|
|
:main
|
|
{:entries [app.main app.plugins.api]
|
|
:depends-on #{:shared}
|
|
:init-fn app.main/init}
|
|
|
|
:util-highlight
|
|
{:entries [app.util.code-highlight]
|
|
:depends-on #{:main}}
|
|
|
|
:main-auth
|
|
{:entries [app.main.ui.auth
|
|
app.main.ui.auth.verify-token]
|
|
:depends-on #{:main}}
|
|
|
|
:main-viewer
|
|
{:entries [app.main.ui.viewer]
|
|
:depends-on #{:main :main-auth}}
|
|
|
|
:main-workspace
|
|
{:entries [app.main.ui.workspace]
|
|
:depends-on #{:main}}
|
|
|
|
:main-dashboard
|
|
{:entries [app.main.ui.dashboard]
|
|
:depends-on #{:main}}
|
|
|
|
:main-settings
|
|
{:entries [app.main.ui.settings]
|
|
:depends-on #{:main}}
|
|
|
|
:render
|
|
{:entries [app.render]
|
|
:depends-on #{:shared}
|
|
:init-fn app.render/init}
|
|
|
|
:rasterizer
|
|
{:entries [app.rasterizer]
|
|
:depends-on #{:shared}
|
|
:init-fn app.rasterizer/init}}
|
|
|
|
:js-options
|
|
{:entry-keys ["module" "browser" "main"]
|
|
:export-conditions ["module" "import", "browser" "require" "default"]
|
|
:js-provider :external
|
|
:external-index "target/index.js"
|
|
:external-index-format :esm}
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:warnings {:fn-deprecated false}}
|
|
|
|
:release
|
|
{:closure-defines {goog.DEBUG false
|
|
goog.debug.LOGGING_ENABLED true}
|
|
:compiler-options
|
|
{:fn-invoke-direct true
|
|
:optimizations #shadow/env ["PENPOT_BUILD_OPTIMIZATIONS" :as :keyword :default :advanced]
|
|
:output-wrapper true
|
|
:rename-prefix-namespace "PENPOT"
|
|
:source-map true
|
|
:elide-asserts true
|
|
:anon-fn-naming-policy :off
|
|
:source-map-detail-level :all}}}
|
|
|
|
:worker
|
|
{:target :browser
|
|
:output-dir "resources/public/js/worker/"
|
|
:asset-path "/js/worker"
|
|
:devtools {:browser-inject :main
|
|
:watch-dir "resources/public"
|
|
:reload-strategy :full}
|
|
:build-options {:manifest-name "manifest.json"}
|
|
:modules
|
|
{:main
|
|
{:entries [app.worker]
|
|
:web-worker true
|
|
:depends-on #{}}}
|
|
|
|
:js-options
|
|
{:entry-keys ["module" "browser" "main"]
|
|
:export-conditions ["module" "import", "browser" "require" "default"]}
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:warnings {:fn-deprecated false}}
|
|
|
|
:release
|
|
{:compiler-options
|
|
{:fn-invoke-direct true
|
|
:optimizations #shadow/env ["PENPOT_BUILD_OPTIMIZATIONS" :as :keyword :default :advanced]
|
|
:output-wrapper true
|
|
:rename-prefix-namespace "PENPOT"
|
|
:source-map true
|
|
:elide-asserts true
|
|
:anon-fn-naming-policy :off
|
|
:source-map-detail-level :all}}}
|
|
|
|
;; FIXME: maybe rename to :components ? (there are nothing storybook
|
|
;; related, is just an ESM export of components that will be used
|
|
;; initially on storybook but not limited to storybook)
|
|
:storybook
|
|
{:target :esm
|
|
:output-dir "target/storybook/"
|
|
:js-options {:js-provider :import}
|
|
|
|
:modules
|
|
{:base
|
|
{:entries []}
|
|
:components
|
|
{:exports {default app.main.ui.ds/default}
|
|
:depends-on #{:base}}}
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:warnings {:fn-deprecated false}}}
|
|
|
|
:test-esm
|
|
{:target :esm
|
|
:output-dir "target/tests"
|
|
:runtime :custom
|
|
|
|
:modules
|
|
{:test {:init-fn frontend-tests.runner/init}}}
|
|
|
|
;; :compiler-options
|
|
;; {:output-feature-set :es2020
|
|
;; :warnings {:fn-deprecated false}}}
|
|
|
|
:lib-penpot
|
|
{:target :esm
|
|
:output-dir "resources/public/libs"
|
|
|
|
:modules
|
|
{:penpot {:exports {:renderPage app.libs.render/render-page-export
|
|
:createFile app.libs.file-builder/create-file-export}}}
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:warnings {:fn-deprecated false}}
|
|
|
|
:release
|
|
{:compiler-options
|
|
{:fn-invoke-direct true
|
|
:source-map true
|
|
:elide-asserts true
|
|
:anon-fn-naming-policy :off
|
|
:source-map-detail-level :all}}}
|
|
|
|
:bench
|
|
{:target :node-script
|
|
:output-to "target/bench.js"
|
|
:output-dir "target/bench/"
|
|
:main bench/main
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:warnings {:fn-deprecated false}}
|
|
|
|
:release
|
|
{:compiler-options
|
|
{:fn-invoke-direct true
|
|
:elide-asserts true
|
|
:anon-fn-naming-policy :off}}}
|
|
|
|
:test
|
|
{:target :node-test
|
|
:output-to "target/tests.cjs"
|
|
:output-dir "target/test/"
|
|
:ns-regexp "^frontend-tests.*-test$"
|
|
:autorun true
|
|
|
|
:js-options
|
|
{:entry-keys ["module" "browser" "main"]}
|
|
|
|
:compiler-options
|
|
{:output-feature-set :es2020
|
|
:output-wrapper false
|
|
:source-map true
|
|
:source-map-include-sources-content true
|
|
:source-map-detail-level :all
|
|
:warnings {:fn-deprecated false}}}
|
|
|
|
}}
|