Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Do macro requirements properly
Browse files Browse the repository at this point in the history
  • Loading branch information
harto committed Apr 4, 2013
1 parent 8ed792e commit 7ec8fa7
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 51 deletions.
4 changes: 2 additions & 2 deletions common/src/cljx/enoki/asset.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

^:clj (ns enoki.asset
(:require [enoki.asset-impl :as impl]
[enoki.macro-requirements])
[enoki.error])
(:use [enoki.error-macros :only [signal-error]]))

^:cljs (ns enoki.asset
(:require [enoki.asset-impl :as impl]
[enoki.macro-requirements])
[enoki.error])
(:use-macros [enoki.error-macros :only [signal-error]]))

;; ## Loading
Expand Down
6 changes: 3 additions & 3 deletions common/src/cljx/enoki/engine.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
(:require [enoki.event :as e]
[enoki.graphics :as g]
[enoki.keyboard :as kbd]
[enoki.logging-macros :as log]
[enoki.macro-requirements])
[enoki.logging]
[enoki.logging-macros :as log])
(:use [enoki.core :only [now]]))

^:cljs (ns enoki.engine
(:require [goog.Timer :as timer]
[enoki.event :as e]
[enoki.graphics :as g]
[enoki.keyboard :as kbd]
[enoki.macro-requirements])
[enoki.logging])
(:require-macros [enoki.logging-macros :as log])
(:use [enoki.core :only [now]]))

Expand Down
3 changes: 2 additions & 1 deletion common/src/cljx/enoki/error.cljx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(ns enoki.error)
(ns enoki.error
(:require [enoki.logging]))

^:clj (defn error
([message]
Expand Down
34 changes: 0 additions & 34 deletions common/src/cljx/enoki/macro_requirements.cljx

This file was deleted.

2 changes: 0 additions & 2 deletions example/common/src/cljx/game/component.cljx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
;; Game-specific components

^:clj (ns game.component
(:require [enoki.macro-requirements])
(:use [enoki.component-macros :only [defcomponent]]))

^:cljs (ns game.component
(:require [enoki.macro-requirements])
(:use-macros [enoki.component-macros :only [defcomponent]]))

(defcomponent position [x y]
Expand Down
4 changes: 2 additions & 2 deletions example/common/src/cljx/game/main.cljx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[enoki.entity :as entity]
[enoki.event :as event]
[enoki.graphics :as gfx]
[enoki.logging]
[enoki.logging-macros :as log]
[enoki.macro-requirements]
[game.component :as comp])
(:use [enoki.core :only [now]]))

Expand All @@ -17,7 +17,7 @@
[enoki.entity :as entity]
[enoki.event :as event]
[enoki.graphics :as gfx]
[enoki.macro-requirements]
[enoki.logging]
[game.component :as comp])
(:require-macros [enoki.logging-macros :as log])
(:use [enoki.core :only [now]])
Expand Down
5 changes: 3 additions & 2 deletions swing/src/enoki/graphics/java2d.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

(ns enoki.graphics.java2d
(:require [seesaw.core :as seesaw]
[enoki.error]
[enoki.event :as event]
[enoki.logging-macros :as log]
[enoki.macro-requirements])
[enoki.logging]
[enoki.logging-macros :as log])
(:use [enoki.error-macros :only [signal-error]]
[enoki.graphics])
(:import [java.awt Canvas Color Dimension Image]))
Expand Down
4 changes: 2 additions & 2 deletions swing/src/enoki/swing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[seesaw.core :as seesaw]
[enoki.graphics.java2d :as gfx]
[enoki.keyboard :as kbd]
[enoki.logging-macros :as log]
[enoki.macro-requirements])
[enoki.logging]
[enoki.logging-macros :as log])
(:import [java.awt.event KeyEvent]))

(def ^:private key-names
Expand Down
2 changes: 1 addition & 1 deletion web/src/cljs/enoki/graphics/canvas.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;; An HTML5 `<canvas>`-based graphics implementation.

(ns enoki.graphics.canvas
(:require [enoki.macro-requirements])
(:require [enoki.error])
(:use [enoki.graphics :only [Context Display display-width display-height]])
(:use-macros [enoki.error-macros :only [signal-error]]))

Expand Down
3 changes: 1 addition & 2 deletions web/src/cljs/enoki/web.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
(:require [clojure.browser.repl :as repl]
[enoki.graphics.canvas :as gfx]
[enoki.keyboard :as kbd]
[enoki.logging :as logging]
[enoki.macro-requirements])
[enoki.logging :as logging])
(:require-macros [enoki.logging-macros :as log]))

(def key-names
Expand Down

0 comments on commit 7ec8fa7

Please sign in to comment.