Skip to content

Commit

Permalink
Sort modules in modulebrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
rundis committed Mar 15, 2016
1 parent c164b04 commit 0460708
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lt/plugins/elm_light.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
(let [path (-> @ed :info :path)]
(notifos/done-working "")
(notifos/set-msg! (str "Elm make error: " res) {:class "error"})
(console/log res {:class "error"}))))
(console/error res))))



Expand Down
6 changes: 4 additions & 2 deletions src/lt/plugins/elm_light/modulebrowser.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
(defn- get-package-modules [project-path]
(->> (u/get-project-deps project-path)
(filter :exact)
(mapcat (partial get-exposed-modules project-path))))
(mapcat (partial get-exposed-modules project-path))
(sort-by :name)))


(defn- deduce-module-name [root-path elm-file-path]
Expand All @@ -67,7 +68,8 @@
{:name (deduce-module-name (files/join project-path dir) x)
:file x}))))))
(map (fn [m]
(assoc m :packageName (files/basename project-path) :version (:version pck-json)))))))
(assoc m :packageName (files/basename project-path) :version (:version pck-json))))
(sort-by :name))))



Expand Down

0 comments on commit 0460708

Please sign in to comment.