mirror of https://github.com/status-im/reagent.git
Breaking change: Require react.js to be included separately
This makes the project.clj a little messier, but makes it a lot easier to use a different version or a custom build of React.
This commit is contained in:
parent
3a943b0ad2
commit
7bbe917285
9
Makefile
9
Makefile
|
@ -9,7 +9,7 @@ PROF = dev,test
|
|||
CLJSBUILD = client
|
||||
CLJSDIRS = src test
|
||||
|
||||
VERSION = 0.0.4-SNAPSHOT
|
||||
VERSION = 0.1.0-SNAPSHOT
|
||||
|
||||
all: buildrun
|
||||
|
||||
|
@ -44,10 +44,13 @@ veryclean: clean
|
|||
bower_components:
|
||||
bower install react#v0.8.0
|
||||
|
||||
src/cloact/impl/react.min.js: bower_components/react/react-with-addons.min.js Makefile
|
||||
src/cloact/react.min.js: bower_components/react/react.min.js Makefile
|
||||
cp $< $@
|
||||
|
||||
copyjs: bower_components src/cloact/impl/react.min.js
|
||||
src/cloact/react.js: bower_components/react/react.js Makefile
|
||||
cp $< $@
|
||||
|
||||
copyjs: bower_components src/cloact/react.min.js src/cloact/react.js
|
||||
|
||||
gensite:
|
||||
node bin/gen-site.js
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
|
||||
|
||||
(defproject simple-cloact "0.0.3"
|
||||
(defproject simple-cloact "0.1.0-SNAPSHOT"
|
||||
:dependencies [[org.clojure/clojure "1.5.1"]
|
||||
[org.clojure/clojurescript "0.0-2120"]
|
||||
[cloact "0.0.3"]]
|
||||
[org.clojure/clojurescript "0.0-2138"]
|
||||
[cloact "0.1.0-SNAPSHOT"]]
|
||||
:plugins [[lein-cljsbuild "1.0.1"]]
|
||||
:hooks [leiningen.cljsbuild]
|
||||
:profiles {:prod {:cljsbuild
|
||||
{:builds
|
||||
{:client {:compiler
|
||||
{:optimizations :advanced
|
||||
:preamble ^:replace ["cloact/react.min.js"]
|
||||
:pretty-print false}}}}}
|
||||
:srcmap {:cljsbuild
|
||||
{:builds
|
||||
|
@ -21,6 +22,7 @@
|
|||
{:builds
|
||||
{:client {:source-paths ["src"]
|
||||
:compiler
|
||||
{:output-dir "target/client"
|
||||
{:preamble ["cloact/react.js"]
|
||||
:output-dir "target/client"
|
||||
:output-to "target/client.js"
|
||||
:pretty-print true}}}})
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
|
||||
|
||||
(defproject todomvc-cloact "0.0.3"
|
||||
(defproject todomvc-cloact "0.1.0-SNAPSHOT"
|
||||
:dependencies [[org.clojure/clojure "1.5.1"]
|
||||
[org.clojure/clojurescript "0.0-2120"]
|
||||
[cloact "0.0.3"]]
|
||||
[org.clojure/clojurescript "0.0-2138"]
|
||||
[cloact "0.1.0-SNAPSHOT"]]
|
||||
:plugins [[lein-cljsbuild "1.0.1"]]
|
||||
:hooks [leiningen.cljsbuild]
|
||||
:profiles {:prod {:cljsbuild
|
||||
{:builds
|
||||
{:client {:compiler
|
||||
{:optimizations :advanced
|
||||
:preamble ^:replace ["cloact/react.min.js"]
|
||||
:pretty-print false}}}}}
|
||||
:srcmap {:cljsbuild
|
||||
{:builds
|
||||
|
@ -21,6 +22,7 @@
|
|||
{:builds
|
||||
{:client {:source-paths ["src"]
|
||||
:compiler
|
||||
{:output-dir "target/client"
|
||||
{:preamble ["cloact/react.js"]
|
||||
:output-dir "target/client"
|
||||
:output-to "target/client.js"
|
||||
:pretty-print true}}}})
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
|
||||
(defproject cloact "0.0.4-SNAPSHOT"
|
||||
(defproject cloact "0.1.0-SNAPSHOT"
|
||||
:url "http://github.com/holmsand/cloact"
|
||||
:license {:name "MIT"}
|
||||
:description "A simple ClojureScript interface to React"
|
||||
:dependencies [[org.clojure/clojure "1.5.1"]
|
||||
[org.clojure/clojurescript "0.0-2138"]]
|
||||
:plugins [[lein-cljsbuild "1.0.1"]]
|
||||
;; :hooks [leiningen.cljsbuild]
|
||||
:profiles {:prod {:cljsbuild
|
||||
{:builds
|
||||
{:client {:compiler
|
||||
{:optimizations :advanced
|
||||
:preamble ^:replace ["cloact/react.min.js"]
|
||||
:pretty-print false}}}}}
|
||||
:test {:plugins [[com.cemerick/clojurescript.test "0.2.1"]]
|
||||
:cljsbuild
|
||||
|
@ -30,6 +30,7 @@
|
|||
{:builds
|
||||
{:client {:source-paths ["src"]
|
||||
:compiler
|
||||
{:output-dir "target/client"
|
||||
{:preamble ["cloact/react.js"]
|
||||
:output-dir "target/client"
|
||||
:output-to "target/cljs-client.js"
|
||||
:pretty-print true}}}})
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
(ns cloact.impl.reactimport
|
||||
(:require-macros [cloact.impl.util :refer [import-js expose-vars]]))
|
||||
|
||||
(import-js "cloact/impl/react.min.js")
|
||||
;; (import-js "cloact/impl/react.min.js")
|
||||
|
||||
(def React js/React)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue