Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Austin #69

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bb8a40c
move macros.clj to src/clj
magomimmo Nov 6, 2013
811985f
upgrade clj to 1.5.1, cljs to 0.0-1847, cljsbuild to 0.3.2, remove un…
magomimmo Nov 6, 2013
0ebd401
remove blank line from the topo
magomimmo Nov 6, 2013
6f96219
remove not existent dispatch-event fn
magomimmo Nov 6, 2013
d801e9b
add clojurescript.test and move testing stuff into the dev profile
magomimmo Nov 6, 2013
864e290
remove dev profile
magomimmo Nov 6, 2013
bf2c1fc
add dev profile
magomimmo Nov 6, 2013
ce4cad7
move test to temp
magomimmo Nov 6, 2013
f31cd07
move from vector to map, added :source-paths
magomimmo Nov 6, 2013
771a149
name builds
magomimmo Nov 6, 2013
1707a23
add test-commands, dev-resources, remove :ouput-dir and modify :outpu…
magomimmo Nov 6, 2013
93cce00
comment test implemented with clojurescript.test
magomimmo Nov 6, 2013
c13555d
add unit tests
magomimmo Nov 6, 2013
7af6126
add more unit tests
magomimmo Nov 6, 2013
687331a
update rules
magomimmo Nov 6, 2013
dc14db9
update cljs to r1978 and cljsbuild to 1.0.0-alpha1
magomimmo Nov 6, 2013
dfe37f7
update edge unit tests
magomimmo Nov 6, 2013
18d5b5e
update cljs to r2014
magomimmo Nov 7, 2013
c6153fb
comment other tests already implemented with clojurescript.test lib
magomimmo Nov 7, 2013
14ae284
completed xpath standard tests
magomimmo Nov 7, 2013
6822cb3
comment prepend! test
magomimmo Nov 7, 2013
f5739d9
add prepend! unit test
magomimmo Nov 7, 2013
528fac2
update cljs.test to 0.2.0
magomimmo Nov 7, 2013
52a516b
comment few more tests
magomimmo Nov 7, 2013
f830565
add more unit tests
magomimmo Nov 7, 2013
3b13f9d
comment other 3 tests
magomimmo Nov 7, 2013
221f720
add other unit tests
magomimmo Nov 7, 2013
3fd5ceb
comment builds and tests to speedup round trip
magomimmo Nov 7, 2013
80f0eb6
commented out :none build and test to speedup lifecycle until the uni…
magomimmo Nov 8, 2013
7dfb5f5
update cljs to r2030
magomimmo Nov 9, 2013
e3edc26
update cljsbuild to 1.0.0-alpha2
magomimmo Nov 18, 2013
c33c5e1
add austin plugin
magomimmo Nov 18, 2013
4556145
add ring, compojure and enlive to run a very thiny server
magomimmo Nov 18, 2013
4147bc4
add dev-resources to :resource-paths and add dev-resources/clj to tes…
magomimmo Nov 18, 2013
5c9916d
add index.html to supporto brepl with austin
magomimmo Nov 18, 2013
901206a
add stuff to support austin brepl
magomimmo Nov 18, 2013
2694509
add repl-options
magomimmo Nov 18, 2013
9ad0fe5
move emitted js into the head
magomimmo Nov 18, 2013
6007cd0
add dev-resources/cljs to test-paths and to whitespace build
magomimmo Nov 18, 2013
c8f8eca
add brepl connection
magomimmo Nov 18, 2013
41a895d
update rules
magomimmo Nov 18, 2013
a9e7e61
remove public dirs
magomimmo Nov 18, 2013
6a34f7a
remove useless build specs
magomimmo Nov 18, 2013
8e321fa
add brepl help text
magomimmo Nov 18, 2013
9f8ab58
update lein-cljsbuild to 1.0.0
magomimmo Nov 26, 2013
984b5dd
update clojurescript.test to 0.2.1
magomimmo Nov 26, 2013
4a3b7ce
add injections to simplify the brepl connection
magomimmo Nov 26, 2013
0feb250
rename domina.server to ring.server
magomimmo Nov 26, 2013
d775282
update index.html
magomimmo Nov 26, 2013
571e62a
clj=1.7.0, cljs=0.0-3308, cljsbuild=1.1.0 and added clean-targets
magomimmo Oct 20, 2015
f7a0f80
move domina.cljs to core.cljs
magomimmo Oct 20, 2015
648e8f7
change domina ns in domina.core
magomimmo Oct 20, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
classes
.cljsbuild
.lein-deps-sum
public/build_no_opt
public/test_*.js
public/domina.js
domina-tests
.lein-repl-history
lib
out
dev-resources/public/js/*.js
*.jar
.repl
pom.xml
.lein-plugins
.lein-failures
/target
target
*.*~
\#*#
.#*
Expand Down
23 changes: 23 additions & 0 deletions dev-resources/clj/ring/server.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(ns ring.server
(:require [cemerick.austin.repls :refer (browser-connected-repl-js)]
[net.cgrand.enlive-html :as enlive]
[compojure.route :refer (resources)]
[compojure.core :refer (GET defroutes)]
ring.adapter.jetty
[clojure.java.io :as io]))

(enlive/deftemplate page
(io/resource "public/index.html")
[]
[:body] (enlive/append
(enlive/html [:script (browser-connected-repl-js)])))

(defroutes site
(resources "/")
(GET "/*" req (page)))

(defn run
[]
(defonce server
(ring.adapter.jetty/run-jetty #'site {:port 8080 :join? false}))
server)
6 changes: 6 additions & 0 deletions dev-resources/cljs/domina/brepl.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(ns domina.brepl
(:require [clojure.browser.repl]))

(defn whoami
[]
(.-userAgent js/navigator))
36 changes: 36 additions & 0 deletions dev-resources/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>bREPL Connection</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="js/whitespace.js" type="text/javascript"></script>
</head>
<body>
<h1>BREPL connection</h1>
<h2>Running the brepl</h2>
<ol>
<li><code>cd</code> to
<code>$DOMINA</code>, and run:
<pre>$ lein do compile, repl</pre> This will compile the domina cljs code.
<li>Once you're in the REPL evaluate
<code>(run)</code>. That just starts jetty on port
<code>8080</code>; if you open a browser to
<a href="http://localhost:8080">that server</a>, you'll
see this page.
</li>
<li>Activate the browser-connected REPL like so:
<pre>(browser-repl)</pre>
</li>
<li>Now that the ClojureScript REPL is ready, you need to load
<a href="http://localhost:8080">http://localhost:8080</a>, or
reload it if you brought it up before the REPL environment was
created. Once you do that, evaluate some ClojureScript to make
sure your shiny new REPL is working, e.g.
<pre>(js/alert "Hello, Domina!")</pre>
</li>
</ol>
</body>
</html>
45 changes: 45 additions & 0 deletions profiles.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{:dev {:resource-paths ["dev-resources"]
:test-paths ["dev-resources/clj" "test/cljs" "dev-resources/cljs"]
:dependencies [[hiccups "0.2.0"]
[ring "1.2.1"]
[compojure "1.1.6"]
[enlive "1.1.4"]]
:plugins [[com.cemerick/clojurescript.test "0.2.1"]
[com.cemerick/austin "0.1.3"]]
:cljsbuild {:builds {#_:none
#_{:source-paths ["src/cljs" "test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:pretty-print true
:optimizations :none
:output-to "dev-resources/public/js/none.js"}}
:whitespace
{:source-paths ["src/cljs" "test/cljs" "dev-resources/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :whitespace
:pretty-print true
:output-to "dev-resources/public/js/whitespace.js"}}
#_:simple
#_{:source-paths ["src/cljs" "test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :simple
:pretty-print true
:output-to "dev-resources/public/js/simple.js"}}
#_:advanced
#_{:source-paths ["src/cljs" "test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :advanced
:pretty-print true
:output-to "dev-resources/public/js/advanced.js"}}}
:test-commands {"whitespace"
["phantomjs" :runner "dev-resources/public/js/whitespace.js"]

#_"simple"
#_["phantomjs" :runner "dev-resources/public/js/simple.js"]

#_"advanced"
#_["phantomjs" :runner "dev-resources/public/js/advanced.js"]}}
:injections [(require '[ring.server :as http :refer [run]]
'cemerick.austin.repls)
(defn browser-repl []
(cemerick.austin.repls/cljs-repl (reset! cemerick.austin.repls/browser-repl-env
(cemerick.austin/repl-env))))]}}
51 changes: 7 additions & 44 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,47 +1,10 @@
(defproject domina "1.0.3-SNAPSHOT"
:description "A DOM manipulation library for ClojureScript inspired by JQuery"
:source-paths ["src/cljs"]
:dependencies [[org.clojure/clojure "1.4.0"]]
:plugins [[lein-cljsbuild "0.3.0"]
[lein-clojars "0.9.1"]]
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "0.0-3308"]]
:plugins [[lein-cljsbuild "1.1.0"]]
:hooks [leiningen.cljsbuild]
:cljsbuild {:builds [{:jar true
:compiler {:libs ["goog/dom/query.js"]
:pretty-print true
:output-dir ".cljsbuild/domina"
:output-to "public/domina.js"}}
{:source-paths ["test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:pretty-print true
:optimizations :none
:output-dir "public/build_no_opt"
:output-to "public/test_no_opt.js"}}
{:source-paths ["test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :whitespace
:pretty-print true
:output-dir ".cljsbuild/whitespace"
:output-to "public/test_whitespace.js"}}
{:source-paths ["test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :simple
:pretty-print true
:output-dir ".cljsbuild/simple"
:output-to "public/test_simple.js"}}
{:source-paths ["test/cljs"]
:compiler {:libs ["goog/dom/query.js"]
:optimizations :advanced
:pretty-print true
:output-dir ".cljsbuild/advanced"
:output-to "public/test_advanced.js"}}]}
:repositories {"sonatype-staging"
"https://oss.sonatype.org/content/groups/staging/"})

(comment
(do
(require '[cljs.repl :as repl])
(require '[cljs.repl.browser :as browser])
(def env (browser/repl-env))
(repl/repl env))

)
:cljsbuild {:builds {:useless
{:source-paths ["src/cljs"]}}}
:clean-targets ^{:protect false} ["dev-resources/public/js" :target-path])
27 changes: 0 additions & 27 deletions public/test_advanced.html

This file was deleted.

12 changes: 0 additions & 12 deletions public/test_ie.html

This file was deleted.

31 changes: 0 additions & 31 deletions public/test_no_opt.html

This file was deleted.

27 changes: 0 additions & 27 deletions public/test_simple.html

This file was deleted.

27 changes: 0 additions & 27 deletions public/test_whitespace.html

This file was deleted.

44 changes: 0 additions & 44 deletions public/tests.css

This file was deleted.

Loading