Move demo to separate directory

This commit is contained in:
Dan Holmsand 2014-01-10 11:49:36 +01:00
parent 7bbe917285
commit 94cdfd6a2f
7 changed files with 19 additions and 15 deletions

View File

@ -1,7 +1,7 @@
PORT = 4562 PORT = 4562
PROF = dev PROF = dev,demo
PROF = dev,test PROF = dev,demo,test
# PROF = dev,test,srcmap # PROF = dev,test,srcmap
# PROF = prod,test # PROF = prod,test
# PROF = prod # PROF = prod
@ -55,10 +55,10 @@ copyjs: bower_components src/cloact/react.min.js src/cloact/react.js
gensite: gensite:
node bin/gen-site.js node bin/gen-site.js
prodbuild: demobuild:
$(MAKE) PROF=prod,test leinbuild $(MAKE) PROF=prod,demo leinbuild
buildsite: prodbuild gensite buildsite: demobuild gensite
setversion: setversion:
version=$(VERSION); \ version=$(VERSION); \

View File

@ -304,11 +304,6 @@
:defs [:ns :calc-bmi :bmi-data :set-bmi :slider :defs [:ns :calc-bmi :bmi-data :set-bmi :slider
:bmi-component]}]]) :bmi-component]}]])
(defn test-results []
[:div.demo-text
[:h2 "Test results"]
[runtests/test-output]])
(defn complete-simple-demo [] (defn complete-simple-demo []
[:div.demo-text [:div.demo-text
[:h2 "Complete demo"] [:h2 "Complete demo"]
@ -340,8 +335,6 @@
(defn demo [] (defn demo []
[:div [:div
[:div.test-output-mini
[runtests/test-output-mini]]
[:div.cloact-demo [:div.cloact-demo
[:h1 "Cloact: Minimalistic React for ClojureScript"] [:h1 "Cloact: Minimalistic React for ClojureScript"]
[intro] [intro]
@ -349,7 +342,6 @@
[essential-api] [essential-api]
[bmi-demo] [bmi-demo]
[performance] [performance]
[test-results]
[complete-simple-demo] [complete-simple-demo]
[todomvc-demo]] [todomvc-demo]]
[github-badge]]) [github-badge]])

View File

@ -19,6 +19,11 @@
{:client {:source-paths ["test" {:client {:source-paths ["test"
"examples/todomvc/src" "examples/todomvc/src"
"examples/simple/src"]}}}} "examples/simple/src"]}}}}
:demo {:cljsbuild
{:builds
{:client {:source-paths ["demo"
"examples/todomvc/src"
"examples/simple/src"]}}}}
:srcmap {:cljsbuild :srcmap {:cljsbuild
{:builds {:builds
{:client {:client

View File

@ -14,8 +14,8 @@
<h1>This will become an example when compiled</h1> <h1>This will become an example when compiled</h1>
<script type="text/javascript" src="../target/cljs-client.js"></script> <script type="text/javascript" src="../target/cljs-client.js"></script>
<script type="text/javascript"> <script type="text/javascript">
//runtests.run(); runtests.mounttests();
demo.mountdemo(); <!-- demo.mountdemo(); -->
</script> </script>
</body> </body>
</html> </html>

View File

@ -40,3 +40,10 @@
[test-output]) [test-output])
[:div "."]))) [:div "."])))
(defn test-demo []
[:div
[test-output]
[demo/demo]])
(defn ^:export mounttests []
(cloact/render-component [test-demo] (.-body js/document)))