Fixed simple example so that both "lein figwheel" and "lein clean" actually work. Updated README.

This commit is contained in:
Gregg8 2015-05-08 15:01:19 +10:00
parent 965458cd34
commit 4348336a0f
4 changed files with 9 additions and 6 deletions

View File

@ -1,9 +1,9 @@
# Reagent example app now using re-frame
Run "`lein figwheel`" in a terminal to compile the app, and then open example.html.
Run "`lein figwheel`" in a terminal to compile the app, and then open `http://localhost:3449/example.html`.
Any changes to ClojureScript source files (in `src`) will be reflected in the running page immediately (while "`lein figwheel`" is running).
Run "`lein clean; lein with-profile prod compile`" to compile an optimized version.
Run "`lein clean; lein with-profile prod compile`" to compile an optimized version, and then open `resources/public/example.html`.
Original reagent example code found at https://github.com/reagent-project/reagent

View File

@ -2,7 +2,7 @@
(defproject simple-re-frame "0.4.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3208"]
[reagent "0.5.0"]
[reagent "0.5.1-SNAPSHOT"]
[re-frame "0.4.0"]
[figwheel "0.2.6"]]
@ -15,6 +15,7 @@
{:builds {:client {:source-paths ["devsrc"]
:compiler
{:main simpleexample.dev
:asset-path "js"
:optimizations :none
:source-map true
:source-map-timestamp true}}}}}
@ -27,7 +28,9 @@
:figwheel {:repl false}
:clean-targets ^{:protect false} ["resources/public/js"]
:cljsbuild {:builds {:client {:source-paths ["src"]
:compiler
{:output-dir "target/client"
:output-to "target/client.js"}}}})
{:output-dir "resources/public/js"
:output-to "resources/public/js/client.js"}}}})

View File

@ -9,7 +9,7 @@
<div id="app">
<h1>Reagent example app see README.md</h1>
</div>
<script src="target/client.js"></script>
<script src="js/client.js"></script>
<script>
window.onload = function () {
simpleexample.core.run();