DEPRECATED. This template is no longer maintained.
A minimal Om template.
lein new mies-om hello-world
Copyright © 2014 David Nolen
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Less is More template for Om
It looks like the current version on clojars (0.3.1) doesn't have the react 0.11.1 dependency, so the examples in the tutorial at https://github.com/swannodette/om/wiki/Basic-Tutorial don't match what you currently get with "lein new mies-om". Can I bug you for a new release?
I'm going through the basic example on https://github.com/swannodette/om/wiki/Basic-Tutorial and When I look at the index.html after creating/compiling the om-tut I get an error:
Uncaught Error: Assert failed: No target specified to om.core/root
Nothing displays in the browser.
I had to change the original om-tut/src/om_tut/core.cljs you get from the mies-om template (via lein new mies-om om-tut)
from
(om/root
app-state
(fn [app owner]
(dom/h1 nil (:text app)))
(. js/document (getElementById "app")))
to
(om/root
(fn [app owner]
(dom/h1 nil (:text app)))
app-state
{:target (. js/document (getElementById "app"))})
seems like it was missing the {:target... part?
Am I doing something wrong? I get a failure when trying the tutorial.
> lein new meis-om om-tut
Failed to resolve version for meis-om:lein-template:jar:RELEASE: Could not find metadata meis-om:lein-template/maven-metadata.xml in local (/Users/rallen/.m2/repository)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template meis-om on the classpath.
Basic lein app creation/usage seems to work...and I don't understand the issue above, sorry.
> lein new app foobar
Generating a project called foobar based on the 'app' template.
> lein version
Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
> uname -a
Darwin thunder.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Hi,
I was following the basic tutorial for Om on Windows 8.
And it keeps crashing for some reason i don't understand. I have tried to update leiningen and Java and it didn't help.
I'm using Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM.
Btw, I have tried to build it with the "Once" option plus appending the build id, still no luck.
Thanks in advance for any help.
Update: I have tried the mihneadb/cljs-webapp clojurescript leiningen template and it works, so it seems that the issue is not in my setup. I'll try to modify that template to work with om instead, for now at least.
Update 2: And think i have found the issue, cljs-webapp uses [lein-cljsbuild "1.0.1-SNAPSHOT"] for cljsbuild dependency, meis-om [lein-cljsbuild "1.0.2"]. When trying to insert the 1.0.2 version in cljs-webapp, it fails with the same error as meis-om. I'm not sure if this is expected or not though.
Update 3: Yep, changing the cljsbuild dependecy to [lein-cljsbuild "1.0.1-SNAPSHOT"] helped, everything seems to work now. Let's see what this baby can do.
>> lein new mies-om app
>> cd app
>> lein cljsbuild auto
Compiling ClojureScript.
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Unknown Source)
at java.util.regex.Matcher.reset(Unknown Source)
at java.util.regex.Matcher.<init>(Unknown Source)
at java.util.regex.Pattern.matcher(Unknown Source)
at clojure.core$re_matcher.invoke(core.clj:4386)
at clojure.core$re_matches.invoke(core.clj:4423)
at cljsbuild.compat$parse_version.invoke(compat.clj:13)
at clojure.core$map$fn__4207.invoke(core.clj:2485)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.RT.seq(RT.java:484)
at clojure.lang.RT.nthFrom(RT.java:848)
at clojure.lang.RT.nth(RT.java:807)
at cljsbuild.compat$version_in_range_QMARK_.invoke(compat.clj:19)
at leiningen.cljsbuild.subproject$merge_dependencies.invoke(subproject.clj:70)
at leiningen.cljsbuild.subproject$make_subproject.invoke(subproject.clj:94)
at leiningen.cljsbuild$run_local_project.invoke(cljsbuild.clj:23)
at leiningen.cljsbuild$run_compiler.invoke(cljsbuild.clj:56)
at leiningen.cljsbuild$once.invoke(cljsbuild.clj:122)
at leiningen.cljsbuild$cljsbuild.doInvoke(cljsbuild.clj:214)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$apply_task.invoke(main.clj:230)
at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
at leiningen.core.main$_main.doInvoke(main.clj:290)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:617)
at clojure.main$main_opt.invoke(main.clj:335)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at clojure.lang.Var.invoke(Var.java:431)
at clojure.lang.AFn.applyToHelper(AFn.java:178)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Hi David,
In index.html the version of react.js is hardcoded.
We are supposed to have version 0.9.0 of react.js with Om 0.5.0 ?
Thank's a lot for the good work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.