-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try a fix for cljs.analyzer dependency not working
- Loading branch information
1 parent
ca90a1d
commit ee39e09
Showing
3 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
(ns snitch.mock-analyzer | ||
(ns snitch.analyzer | ||
"Mocking the clojurescript.analyzer ns. | ||
Required if you want to exclude cljs deps for a clj only project | ||
" | ||
(:refer-clojure :exclude [macroexpand-1])) | ||
|
||
|
||
(try | ||
(require '[cljs.analyzer :as ana]) | ||
(catch Exception _)) | ||
|
||
|
||
(defn macroexpand-1 | ||
[_env form] | ||
form) | ||
[env form] | ||
(if (resolve 'ana) | ||
(eval '(ana/macroexpand-1 env form)) | ||
form)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters