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

View File

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

View File

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

View File

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

View File

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