reagent/project.clj
Juho Teperi c68f5a88f4 Optimize node modules, remove old stuff
- Removed webpack build for now, not up-to-date, can be added later if
needed
- Share node modules using symlinks for envs that use the same packages
2017-10-13 16:42:25 +03:00

102 lines
4.6 KiB
Clojure

(defproject reagent "0.8.0-alpha1"
:url "http://github.com/reagent-project/reagent"
:license {:name "MIT"}
:description "A simple ClojureScript interface to React"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.946"]
;; If :npm-deps enabled, these are used only for externs.
;; Without direct react dependency, other packages,
;; like react-leaflet might have closer dependency to a other version.
[cljsjs/react "15.6.2-0"]
[cljsjs/react-dom "15.6.2-0"]
[cljsjs/react-dom-server "15.6.2-0"]
[cljsjs/create-react-class "15.6.2-0"]]
:plugins [[lein-cljsbuild "1.1.7"]
[lein-doo "0.1.8"]
[lein-codox "0.10.3"]]
:source-paths ["src"]
:codox {:language :clojurescript
:exclude clojure.string
:source-paths ["src"]}
:profiles {:node-test [:test {:cljsbuild
{:builds {:client {:compiler {:target :nodejs
:process-shim false}}}}}]
:test {:cljsbuild
{:builds {:client {:compiler {:main "reagenttest.runtests"}}}}}
:react-16 {:dependencies [[cljsjs/react "16.0.0-0"]
[cljsjs/react-dom "16.0.0-0"]
[cljsjs/react-dom-server "16.0.0-0"]]}
:site {:resource-paths ^:replace ["outsite"]
:figwheel {:css-dirs ^:replace ["outsite/public/css"]}}
:prod [:site
{:cljsbuild
{:builds {:client
{:compiler {:optimizations :advanced
:elide-asserts true
:pretty-print false
;; :pseudo-names true
:output-dir "target/client"}}}}}]
:prerender [:prod
{:cljsbuild
{:builds {:client
{:compiler {:main "sitetools.prerender"
:target :nodejs
;; Undefine module and exports so React UMD modules work on Node
:output-to "pre-render/main.js"
:output-dir "pre-render/out"}}}}}]
:prod-test [:prod :test]
:dev {:dependencies [[figwheel "0.5.14"]
[doo "0.1.8"]]
:plugins [[lein-figwheel "0.5.14"]]
:source-paths ["demo"] ;; for lighttable
:resource-paths ["site" "outsite"]
:figwheel {:css-dirs ["site/public/css"]}
:cljsbuild
{:builds
{:client
{:figwheel true
:compiler {:source-map true
:optimizations :none
;; :recompile-dependents false
:output-dir "outsite/public/js/out"
:asset-path "js/out"}}}}}}
:clean-targets ^{:protect false} [:target-path :compile-path
"outsite/public/js"
"outsite/public/site"
"outsite/public/news"
"outsite/public/css"
"outsite/public/index.html"
"out"
"pre-render"]
:cljsbuild {:builds {:client
{:source-paths ["src"
"demo"
"test"
"examples/todomvc/src"
"examples/simple/src"
"examples/geometry/src"]
:compiler {:parallel-build true
:main "reagentdemo.core"
:output-to "outsite/public/js/main.js"
:language-in :ecmascript6
:language-out :ecmascript3
;; Add process.env.NODE_ENV preload
:process-shim true}}}}
:figwheel {:http-server-root "public" ;; assumes "resources"
:repl false})