From 046070871f8b56e5bfe0adcfbdecca8af832d9fc Mon Sep 17 00:00:00 2001 From: rundis Date: Tue, 15 Mar 2016 01:51:11 +0100 Subject: [PATCH] Sort modules in modulebrowser --- src/lt/plugins/elm_light.cljs | 2 +- src/lt/plugins/elm_light/modulebrowser.cljs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lt/plugins/elm_light.cljs b/src/lt/plugins/elm_light.cljs index aebd540..14f5ffe 100644 --- a/src/lt/plugins/elm_light.cljs +++ b/src/lt/plugins/elm_light.cljs @@ -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)))) diff --git a/src/lt/plugins/elm_light/modulebrowser.cljs b/src/lt/plugins/elm_light/modulebrowser.cljs index b5363d4..dfb75d3 100644 --- a/src/lt/plugins/elm_light/modulebrowser.cljs +++ b/src/lt/plugins/elm_light/modulebrowser.cljs @@ -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] @@ -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))))