Giter VIP home page Giter VIP logo

caribou-frontend's Introduction

caribou-frontend's People

Contributors

noisesmith avatar prismofeverything avatar ralfonso avatar yogthos avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fpoms sniperliu

caribou-frontend's Issues

caribou.app.config defaults

I think this should be moved to caribou-development and end up in a user's boot.clj on app creation (probably commented)

Right now, a new app makes it difficult to see what's configurable without looking at caribou's source:

(defn boot
  []
  (let [default (app-config/default-config)
        config (config/config-from-environment default)]
    (caribou/init config)))

versus what's in caribou.app.config (the app-config map in particular)

(defn default-config
  []
  (let [core-config (config/default-config)
        app-config {:app {:public-dir "public"
                          :default-locale "global"
                          :localize-routes ""}
                    :controller {:namespace "skel.controllers"
                                 :reload true
                                 :session-defaults (atom {})}
                    :actions (atom {})
                    :pages (atom ())
                    :routes (atom (flatland/ordered-map))
                    :handler (atom nil)
                    :reset (atom nil)
                    :pre-actions (atom {})
                    :template {:helpers (atom {})
                               :cache-strategy :never}
                    :error {:handlers (atom {})
                            :templates (atom {})
                            :show-stacktrace false}
                    :cljs {:root "resources/cljs"
                           :reload false
                           :options 
                           {:output-dir "resources/public/js/out"
                            :pretty-print true}}
                    :i18n {:enabled false
                           :locales (atom ())
                           :resource-map (atom {})}
                    :middleware (atom [])}]

                    ;; :halo {:enabled true
                    ;;        :hosts ["http://localhost:33333"]
                    ;;        :key "halo-caribou"
                    ;;        :prefix "/_halo"
                    ;;        :hooks (atom {:reload-pages pages/create-page-routes
                    ;;                      :reload-models model/invoke-models
                    ;;                      :reload-halo halo/generate-routes
                    ;;                      :halo-reset identity})
                    ;;        :routes (atom [["GET" "reload-routes" reload-pages]
                    ;;                       ["GET" "reload-halo" reload-halo]
                    ;;                       ["GET" "reload-models" reload-models]])}}]

    (util/deep-merge-with
     (fn [& args]
       (last args))
     core-config
     app-config)))

Need is_xhr in request map

We need to wrap the Ring request map with a function that adds a boolean "is_xhr" (not "is-xhr" since it will be used in templates) key to the map. It should determine if the request was made through XHR by inspecting the "X-Requested-With" header.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.