Skip to content

Commit e8a900a

Browse files
lins05expez
authored andcommitted
Add support for detecting shadow-cljs projects
1 parent b15459f commit e8a900a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- [#455](https://github.com/clojure-emacs/clj-refactor.el/pull/455) Added support for detecting shadow-cljs projects
56
- [#402](https://github.com/clojure-emacs/clj-refactor.el/issues/402) cljr-stop-referring: do not alter strings.
67
- [#380](https://github.com/clojure-emacs/clj-refactor.el/issues/380) clean-ns: fix FileNotFoundException, by trying both the absolute path and the path relative to the project root. This requires a new refactor-nrepl, old versions will only check the absolute path.
78

clj-refactor.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ A new record is created to define this constructor."
823823

824824
(defun cljr--project-dir ()
825825
(or
826-
(thread-last '("project.clj" "build.boot" "pom.xml" "deps.edn")
826+
(thread-last '("project.clj" "build.boot" "pom.xml" "deps.edn" "shadow-cljs.edn")
827827
(mapcar 'cljr--locate-project-file)
828828
(delete 'nil)
829829
car)
@@ -842,6 +842,8 @@ A new record is created to define this constructor."
842842
(let ((file (expand-file-name "pom.xml" project-dir)))
843843
(and (file-exists-p file) file))
844844
(let ((file (expand-file-name "deps.edn" project-dir)))
845+
(and (file-exists-p file) file))
846+
(let ((file (expand-file-name "shadow-cljs.edn" project-dir)))
845847
(and (file-exists-p file) file)))))
846848

847849
(defun cljr--project-files ()

0 commit comments

Comments
 (0)