Skip to content

Commit

Permalink
[core] remove cljx dependency, switch to clj1.7 reader conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 25, 2015
1 parent 661dccf commit d32651e
Show file tree
Hide file tree
Showing 11 changed files with 1,292 additions and 1,170 deletions.
4 changes: 2 additions & 2 deletions geom-core/bench/vector.org
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
[thi.ng.geom.core :as g]
[thi.ng.geom.core.utils :as gu]
[thi.ng.geom.core.vector :as v :refer [vec2 vec3]]
[thi.ng.common.math.core :as m :refer [*eps* HALF_PI PI]]
[thi.ng.math.core :as m :refer [*eps* HALF_PI PI]]
[perforate-x.core :refer :all]))

<<helpers>>
Expand All @@ -182,7 +182,7 @@
[thi.ng.geom.core :as g]
[thi.ng.geom.core.utils :as gu]
[thi.ng.geom.core.vector :as v :refer [vec2 vec3]]
[thi.ng.common.math.core :as m :refer [*eps* HALF_PI PI]]
[thi.ng.math.core :as m :refer [*eps* HALF_PI PI]]
[perforate-x.core :as perf :refer [defgoal defcase]]))

<<helpers>>
Expand Down
2 changes: 1 addition & 1 deletion geom-core/src/core.org
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ protocol consisting of just this one function:

** Complete namespace definition

#+BEGIN_SRC clojure :tangle ../babel/src/cljx/thi/ng/geom/core.cljx :noweb yes :mkdirp yes :padline no
#+BEGIN_SRC clojure :tangle ../babel/src/thi/ng/geom/core.cljc :noweb yes :mkdirp yes :padline no
(ns thi.ng.geom.core
(:refer-clojure :exclude [+ - * min max into]))

Expand Down
37 changes: 11 additions & 26 deletions geom-core/src/index.org
Original file line number Diff line number Diff line change
Expand Up @@ -77,48 +77,33 @@ target/geom-core-<<conf-version()>>.js
:min-lein-version "2.4.0"

:dependencies [<<dep-clj>>
<<dep-cljs>>
<<dep-common>>
<<dep-mmath>>]
<<dep-math>>
<<dep-dstruct>>]

:source-paths ["src/cljx"]
:test-paths ["<<conf-gen-test-path>>"]
:source-paths ["src"]
:test-paths ["test"]

:perforate {:environments [{:namespaces [thi.ng.geom.bench.core.vector]}]}

:profiles {:dev {:dependencies [<<dep-cljs>>
<<dep-perforate-x>>]
:plugins [<<dep-cljx>>
<<dep-cljsbuild>>
:profiles {:dev {:dependencies [<<dep-perforate-x>>]
:plugins [<<dep-cljsbuild>>
<<dep-cljs-test>>
<<dep-perforate>>
<<dep-lein-npm>>]
:node-dependencies [<<dep-npm-benchmark>>]
:global-vars {*warn-on-reflection* true}
:jvm-opts ^:replace []
:auto-clean false
:prep-tasks [["cljx" "once"]]
:aliases {"cleantest" ["do" "clean," "cljx" "once," "test," "cljsbuild" "test"]}}}

:cljx {:builds [{:source-paths ["src/cljx"]
:output-path "<<conf-gen-source-path>>"
:rules :clj}
{:source-paths ["src/cljx"]
:output-path "<<conf-gen-source-path>>"
:rules :cljs}
{:source-paths ["test/cljx"]
:output-path "<<conf-gen-test-path>>"
:rules :clj}
{:source-paths ["test/cljx"]
:output-path "<<conf-gen-test-path>>"
:rules :cljs}]}
:aliases {"cleantest" ["do" "clean," "test," "cljsbuild" "test"]}}}

:cljsbuild {:builds [{:id "simple"
:source-paths ["<<conf-gen-source-path>>" "<<conf-gen-test-path>>"]
:source-paths ["src" "test"]
:compiler {:output-to "<<cljs-artefact-path>>"
:optimizations :whitespace
:pretty-print true}}
{:id "bench"
:source-paths ["<<conf-gen-source-path>>" "<<conf-gen-test-path>>" "benchmarks"]
:source-paths ["src" "test" "benchmarks"]
:notify-command ["node" "target/cljs/benchmark.js"]
:compiler {:target :nodejs
:output-to "target/cljs/benchmark.js"
Expand Down Expand Up @@ -160,7 +145,7 @@ symbol =version= holding the version string defined above:

*** Version namespace :noexport:

#+BEGIN_SRC clojure :tangle ../babel/src/cljx/thi/ng/geom/core/version.cljx :noweb yes :mkdirp yes :padline no
#+BEGIN_SRC clojure :tangle ../babel/src/thi/ng/geom/core/version.cljc :noweb yes :mkdirp yes :padline no
(ns thi.ng.geom.core.version)
(def version "<<conf-version()>>")
#+END_SRC
Expand Down
12 changes: 6 additions & 6 deletions geom-core/src/intersect.org
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,17 @@ Source: http://geomalgorithms.com/a06-_intersect-2.html

** Complete namespace definition

#+BEGIN_SRC clojure :tangle ../babel/src/cljx/thi/ng/geom/core/intersect.cljx :noweb yes :mkdirp yes :padline no
#+BEGIN_SRC clojure :tangle ../babel/src/thi/ng/geom/core/intersect.cljc :noweb yes :mkdirp yes :padline no
(ns thi.ng.geom.core.intersect
#?(:cljs
(:require-macros
[thi.ng.math.macros :as mm]))
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.core.utils :as gu]
[thi.ng.geom.core.vector :as v :refer [vec2 vec3 V2 V3]]
[thi.ng.common.math.core :as m :refer [*eps*]]
,#+clj [thi.ng.macromath.core :as mm])
,#+cljs
(:require-macros
[thi.ng.macromath.core :as mm]))
[thi.ng.math.core :as m :refer [*eps*]]
#?(:clj [thi.ng.math.macros :as mm])))

(defn- sq [x] (* x x))

Expand Down
Loading

0 comments on commit d32651e

Please sign in to comment.