Permalink
Browse files

hello world

  • Loading branch information...
xadn committed Jul 9, 2014
1 parent 8c9cdd7 commit bcf88c3385f23e542a65c5676050e5c5f9052a6c
Showing with 17,640 additions and 7 deletions.
  1. +3 −0 README.md
  2. +1 −0 index.html
  3. +17,619 −0 om_infinite_scroll.js
  4. +7 −4 project.clj
  5. +10 −3 src/om_infinite_scroll/core.cljs
View
@@ -0,0 +1,3 @@
+```sh
+lein cljsbuild auto
+``
View
@@ -1,5 +1,6 @@
<html>
<body>
+ <div id="my-app"></div>
<script src="out/goog/base.js" type="text/javascript"></script>
<script src="om_infinite_scroll.js" type="text/javascript"></script>
<script type="text/javascript">goog.require("om_infinite_scroll.core");</script>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -3,17 +3,20 @@
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.5.1"]
- [org.clojure/clojurescript "0.0-2173"]]
+ [org.clojure/clojurescript "0.0-2173"]
+ [om "0.6.4"]]
:plugins [[lein-cljsbuild "1.0.2"]]
:source-paths ["src"]
- :cljsbuild {
+ :cljsbuild {
:builds [{:id "om-infinite-scroll"
:source-paths ["src"]
:compiler {
:output-to "om_infinite_scroll.js"
:output-dir "out"
- :optimizations :none
- :source-map true}}]})
+ :optimizations :simple
+ :preamble ["react/react.min.js"]
+ :externs ["react/externs/react.js"]
+ }}]})
@@ -1,5 +1,12 @@
-(ns om-infinite-scroll.core)
+(ns om-infinite-scroll.core
+ (:require [om.core :as om :include-macros true]
+ [om.dom :as dom :include-macros true]))
-(enable-console-print!)
+(defn widget [data owner]
+ (reify
+ om/IRender
+ (render [this]
+ (dom/h1 nil (:text data)))))
-(println "Hello world!")
+(om/root widget {:text "Hello world!"}
+ {:target (. js/document (getElementById "my-app"))})

0 comments on commit bcf88c3

Please sign in to comment.