From 76aae051b600a86cf979ec16e3b7be472c6f6a5a Mon Sep 17 00:00:00 2001 From: Tomer Weller Date: Tue, 6 Jun 2017 13:26:31 -0400 Subject: [PATCH] use foreign-libs to include bundle in build --- package.json | 10 ++++----- project.clj | 44 +++++++++++++++++++++------------------ public/index.html | 1 - src/cljsjs/react.cljs | 1 - src/cljsjs/react/dom.cljs | 1 - src/zefstyle/core.cljs | 3 ++- 6 files changed, 31 insertions(+), 29 deletions(-) delete mode 100644 src/cljsjs/react.cljs delete mode 100644 src/cljsjs/react/dom.cljs diff --git a/package.json b/package.json index 2728d21..dc2abcd 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { "name": "zefstyle", - "version": "0.0.1", + "version": "0.0.2", "author": "tomer.weller@gmail.com", "scripts": { "watch": "webpack -d --watch", "build": "webpack -p" }, "dependencies": { - "react": "15.1.0", - "react-dom": "15.1.0", + "react": "15.5.4", + "react-dom": "15.5.4", "webpack": "1.13.1", - "react-player": "0.7.3" + "react-player": "0.18.0" } -} +} \ No newline at end of file diff --git a/project.clj b/project.clj index 09b3075..cc1d403 100644 --- a/project.clj +++ b/project.clj @@ -5,18 +5,18 @@ :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"] - [org.clojure/clojurescript "1.9.36" :scope "provided"] - [reagent "0.6.0-rc" :exclusions [cljsjs/react cljsjs/react-dom]]] + [org.clojure/clojurescript "1.9.562" :scope "provided"] + [reagent "0.6.2" :exclusions [cljsjs/react cljsjs/react-dom]]] - :plugins [[lein-cljsbuild "1.1.3"] - [lein-figwheel "0.5.4-SNAPSHOT"]] + :plugins [[lein-cljsbuild "1.1.6"] + [lein-figwheel "0.5.10"]] :min-lein-version "2.5.0" :clean-targets ^{:protect false} - [:target-path - [:cljsbuild :builds :app :compiler :output-dir] - [:cljsbuild :builds :app :compiler :output-to]] +[:target-path + [:cljsbuild :builds :app :compiler :output-dir] + [:cljsbuild :builds :app :compiler :output-to]] :resource-paths ["public"] @@ -28,24 +28,28 @@ :cljsbuild {:builds {:app {:source-paths ["src" "env/dev/cljs"] :compiler - {:main "zefstyle.dev" - :output-to "public/js/app.js" - :output-dir "public/js/out" - :asset-path "js/out" - :source-map true - :optimizations :none - :pretty-print true}} + {:main "zefstyle.dev" + :output-to "public/js/app.js" + :output-dir "public/js/out" + :asset-path "js/out" + :source-map true + :foreign-libs [{:file "public/js/bundle.js" + :provides ["cljsjs.react" "cljsjs.react.dom" "webpack.bundle"]}] + :optimizations :none + :pretty-print true}} :release {:source-paths ["src" "env/prod/cljs"] :compiler - {:output-to "public/js/app.js" - :output-dir "public/js/release" - :asset-path "js/out" - :optimizations :advanced - :pretty-print false}}}} + {:output-to "public/js/app.js" + :output-dir "public/js/release" + :asset-path "js/out" + :optimizations :advanced + :foreign-libs [{:file "public/js/bundle.js" + :provides ["cljsjs.react" "cljsjs.react.dom" "webpack.bundle"]}] + :pretty-print false}}}} :aliases {"release" ["do" "clean" ["cljsbuild" "once" "release"]]} :profiles {:dev {:dependencies [[lein-figwheel "0.5.4-SNAPSHOT"] [org.clojure/tools.nrepl "0.2.12"] - [com.cemerick/piggieback "0.2.2-SNAPSHOT"]]}}) + [com.cemerick/piggieback "0.2.2-SNAPSHOT"]]}}) \ No newline at end of file diff --git a/public/index.html b/public/index.html index c6edbc6..1b38165 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,6 @@

ClojureScript has not been compiled!

please run lein figwheel in order to start the compiler

- diff --git a/src/cljsjs/react.cljs b/src/cljsjs/react.cljs deleted file mode 100644 index e832300..0000000 --- a/src/cljsjs/react.cljs +++ /dev/null @@ -1 +0,0 @@ -(ns cljsjs.react) diff --git a/src/cljsjs/react/dom.cljs b/src/cljsjs/react/dom.cljs deleted file mode 100644 index 80acff5..0000000 --- a/src/cljsjs/react/dom.cljs +++ /dev/null @@ -1 +0,0 @@ -(ns cljsjs.react.dom) diff --git a/src/zefstyle/core.cljs b/src/zefstyle/core.cljs index bc1dd7e..60ac326 100644 --- a/src/zefstyle/core.cljs +++ b/src/zefstyle/core.cljs @@ -1,5 +1,6 @@ (ns zefstyle.core - (:require [reagent.core :as reagent :refer [atom]])) + (:require [reagent.core :as reagent :refer [atom]] + [webpack.bundle])) ;; ------------------------- ;; Views