Add README to example

This commit is contained in:
Dan Holmsand 2015-02-09 12:07:46 +01:00
parent 0b1c7ffc33
commit 3e9b42a92b
3 changed files with 11 additions and 11 deletions

View File

@ -0,0 +1,7 @@
# Reagent example app
Run "`lein figwheel`" in a terminal to compile the app, and then open 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.

View File

@ -2,18 +2,12 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>reagent simple example</title> <title>Example</title>
<link rel="stylesheet" href="example.css"> <link rel="stylesheet" href="example.css">
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<h1>Reagent example app</h1> <h1>Reagent example app see README.md</h1>
<p> Run "lein figwheel" in a terminal to compile, wait a while, and then refresh the browser. </p>
<p> Any changes to .cljs files will be reflected in the running page immediately. </p>
<p> Run "lein clean; lein with-profile prod compile" to compile an optimized version. </p>
</div> </div>
<script src="target/client.js"></script> <script src="target/client.js"></script>
<script> <script>

View File

@ -1,4 +1,3 @@
(ns simpleexample (ns simpleexample
(:require [reagent.core :as reagent :refer [atom]])) (:require [reagent.core :as reagent :refer [atom]]))
@ -32,5 +31,5 @@
[color-input]]) [color-input]])
(defn ^:export run [] (defn ^:export run []
(reagent/render-component [simple-example] (reagent/render [simple-example]
(js/document.getElementById "app"))) (js/document.getElementById "app")))