server namespace not needed

server namespace not needed

--- figwheel-repl/src/figwheel/server.clj
+++ figwheel-repl/src/figwheel/server.clj
@@ -1,65 +0,0 @@
-(ns figwheel.server
-  (:require
-   [clojure.string :as string]
-   [ring.middleware.stacktrace :refer [wrap-stacktrace]]
-   [clojure.java.browse :refer [browse-url]]
-   [figwheel.server.jetty-websocket :as jtw]))
-
-;; TODO this could be smarter and introspect the environment
-;; to see what server is available??
-
-
-;; taken from ring server
-(defn try-port
-  "Try running a server under one port or a list of ports. If a list of ports
-  is supplied, try each port until it succeeds or runs out of ports."
-  [port server-fn]
-  (if-not (sequential? port)
-    (server-fn port)
-    (try (server-fn (first port))
-         (catch java.net.BindException ex
-           (if-let [port (next port)]
-             (try-port port server-fn)
-             (throw ex))))))
-
-#_((meta #'ring.jetty.adapter/run-jetty))
-
-(defn run-server
-  "Start a web server to run a handler.
-   Takes all of the ring.jetty.adapter/run-jetty options
-
-   Additional options:
-    :port                  - the port or ports to try to run the server on
-    :init                  - a function to run before the server starts
-    :open-browser?         - if true, open a web browser after the server starts
-    :browser-uri           - the path to browse to when opening a browser
-    :stacktraces?          - if true, display stacktraces when an exception is thrown
-    :stacktrace-middleware - a middleware that handles stacktraces"
-  {:arglists '([handler] [handler options])}
-  [handler & [{:keys [init destroy join? port] :as options}]]
-  (let [options (assoc options :join? false) ;; join needs to be false
-        destroy (if destroy (memoize destroy))
-        handler (add-stacktraces handler options)]
-    (if init (init))
-    (try-port port
-      (fn [port']
-        (let [options (assoc options :port port')
-              server  (jtw/run-server* handler options)]
-          (println "Figwheel REPL: Started server on port" (server-port server))
-          server)))))
-
-(comment
-  (require 'figwheel.server.ring)
-
-  (def scratch (atom {}))
-
-  (def serve (jtw/run-jetty
-              (figwheel.server.ring/default-stack not-found {})
-              {:port 9500 :join? false}))
-
-  (.stop serve)
-
-
-
-
-  )


Make search input a reasonable size & not do weird background things on hover

--- frontend/components/add_projects.cljs
+++ frontend/components/add_projects.cljs
@@ -200,18 +200,20 @@
             repos-explanation
             (if-not (seq repos)
               [:div.loading-spinner common/spinner]
-              [:ul.proj-list
-               [:li.filter (om/build repo-filter settings)]
-               (let [filtered-repos (filter (fn [repo]
-                                              (-> repo
-                                                  :name
-                                                  (.toLowerCase)
-                                                  (.indexOf repo-filter-string)
-                                                  (not= -1)))
-                                            repos)]
-                 (map (fn [repo] (om/build repo-item {:repo repo
-                                                      :settings settings}))
-                      filtered-repos))]))
+
+              [:div
+               (om/build repo-filter settings)
+               [:ul.proj-list
+                (let [filtered-repos (filter (fn [repo]
+                                               (-> repo
+                                                   :name
+                                                   (.toLowerCase)
+                                                   (.indexOf repo-filter-string)
+                                                   (not= -1)))
+                                             repos)]
+                  (map (fn [repo] (om/build repo-item {:repo repo
+                                                       :settings settings}))
+                       filtered-repos))]]))
           invite-modal])))))

 (defn add-projects [data owner]


fix missing [

fix missing [

--- domain/templates/type/list/views.cljs
+++ domain/templates/type/list/views.cljs
@@ -1,5 +1,5 @@
 (ns <%= namespace %>.<%= domain %>.list.views
-    (:require [reagent.core :as r)
+    (:require [reagent.core :as r])
     (:require [re-frame.core :refer [subscribe dispatch]])
     (:require [<%= domain %>.item.views :refer [<%= domain %>-item]]))


[network] Some epoch data could get dropped on the floor if the sizes didn't divide nicely.

--- cortex/src/cortex/nn/network.cljc
+++ cortex/src/cortex/nn/network.cljc
@@ -128,7 +128,7 @@
          mean-error-derivative -1.0
          last-error 0.0]
     (if (< mean-error-derivative 0.0)
-      (let [epoch-data (vec (partition batch-size (shuffle (range (count training-data)))))
+      (let [epoch-data (vec (partition batch-size batch-size [] (shuffle (range (count training-data)))))
             [optimizer network]
             (reduce (fn [[optimizer network] batch-indexes]
                       (let [input-seq (mapv training-data batch-indexes)


Adjust mentions of handler.cljs to events.cljs

--- examples/todomvc/src/todomvc/db.cljs
+++ examples/todomvc/src/todomvc/db.cljs
@@ -1,19 +1,19 @@
 (ns todomvc.db
   (:require [cljs.reader]
-            [cljs.spec    :as s]))
+            [cljs.spec :as s]))

 ;; -- Spec --------------------------------------------------------------------
 ;;
-;; This is a clojure.spec specification which documents the structure of app-db
-;; See: http://clojure.org/guides/spec
+;; This is a clojure.spec specification for the value in app-db. It is like a
+;; Schema. See: http://clojure.org/guides/spec
 ;;
-;; The value in app-db should ALWAYS match this spec. Now, the value in
-;; app-db can ONLY be changed by event handlers so, after each event handler
-;; has run, we re-check that app-db still matches this spec.
+;; The value in app-db should always match this spec. Only event handlers
+;; can change the value in app-db so, after each event handler
+;; has run, we re-check app-db for correctness (compliance with the Schema).
 ;;
-;; How is this done? Look in handlers.cljs and you'll notice that all handers
-;; have an "after" middleware which does the spec re-check.
+;; How is this done? Look in events.cljs and you'll notice that all handers
+;; have an "after" interceptor which does the spec re-check.
 ;;
 ;; None of this is strictly necessary. It could be omitted. But we find it
 ;; good practice.


figwheel.main: auto add watched-directories to classpath

--- figwheel-main/src/figwheel/main.cljc
+++ figwheel-main/src/figwheel/main.cljc
@@ -786,7 +786,7 @@
                  (pr-str k))))))

 ;; takes a string or file representation of a directory
-(defn add-classpath! [dir]
+(defn- add-classpath! [dir]
   (when-not (fw-util/dir-on-classpath? dir)
     (log/warn (ansip/format-str [:yellow
                                  (format "Attempting to dynamically add %s to classpath!"
@@ -836,6 +836,13 @@
                  (cond-> %
                    (:watch options) (conj (:watch options))
                    ns-watch-dir (conj ns-watch-dir)))))))
+
+(defn- config-ensure-watch-dirs-on-classpath [{:keys [::config] :as cfg}]
+  (doseq [src-dir (:watch-dirs config)]
+    (when-not (fw-util/dir-on-classpath? src-dir)
+      (add-classpath! src-dir)
+      (warn-that-dir-not-on-classpath :source src-dir)))
+  cfg)

 ;; needs local config
 (defn figwheel-mode? [{:keys [::config options]}]
@@ -1076,6 +1083,7 @@
        config-main-ns
        config-main-sourch-path-on-classpath
        config-update-watch-dirs
+       config-ensure-watch-dirs-on-classpath
        config-figwheel-mode?
        config-default-dirs
        config-default-asset-path


fix wrong number of arguments in default-fn for try-parse-int

--- backend/src/lambdaui/core.clj
+++ backend/src/lambdaui/core.clj
@@ -35,6 +35,6 @@
     (reset! server (http/run-server (pipeline-routes pipeline) {:port port}))))

 (defn -main [& [portArg]]
-  (let [port (try-parse-int portArg (fn [] (when portArg (println "Port '" portArg "' is not a number. Using default port")) 8081))]
+  (let [port (try-parse-int portArg (fn [_] (when portArg (println "Port '" portArg "' is not a number. Using default port")) 8081))]
     (println "Started Server on port " port ". CTRL+C to abort.")
     (start-server port)))


Removed Github text

Removed Github text

If people are using the hosted app then they do not care that it is
hosted on github

--- idecode/myappshare/mainapp.cljs
+++ idecode/myappshare/mainapp.cljs
@@ -431,15 +431,7 @@
                                      )
                      :disabled  (if (= (read-ui app [:mode]) "login") "true" "")
                      }
-                    (if (:user @client-session-atom) "Logout" "Login"))
-
-
-
-            (if (large-screen)  (div {:style       {:display "inline-block"}}
-                 (a {:target       "appshare.co"
-                     :style       {:textDecoration "underline" :display "inline-block" :marginLeft "30px" :fontFamily "Ubuntu" :fontSize "1em" :marginTop "-0.3em"}
-                     :href         (str "https://github.com/zubairq/AppShare")}
-                    "Github"))))
+                    (if (:user @client-session-atom) "Logout" "Login")))