Code Monkey home page Code Monkey logo

webly's People

Contributors

awb99 avatar masterbuilder99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

webly's Issues

exclude logging backend library from dependencies

Since webly is a library used by other projects (eg. notespace) it shouldn't include any logging backend as a dependency. It should depend only on frontend, having backend configuration in local environment only.
In current setup webly overwrites local logging configuration and causes problems.

shadow-cljs output pretty

https://github.com/pink-gorilla/kernel-cljs-shadowdeps/blob/master/src/pinkgorilla/bundler.clj

(ns pinkgorilla.bundler
(:require
[clojure.pprint]
[cheshire.core :as cheshire]
[clojure.java.io :as io]))

(defn- delete-recursively [fname]
(let [func (fn [func f]
(when (.isDirectory f)
(doseq [f2 (.listFiles f)]
(func func f2)))
(clojure.java.io/delete-file f))]
(func func (clojure.java.io/file fname))))

(defn- create-bundle-directory [config-dir bundle-name]
(let [bundle-dir (str config-dir "/" bundle-name)]
(when (not (.exists (io/file config-dir)))
(.mkdir (java.io.File. config-dir)))
(when (.exists (io/file bundle-dir))
(delete-recursively bundle-dir))
(.mkdir (java.io.File. bundle-dir))))

(defn- package-json [config-dir bundle-name npm-deps]
(let [filename (str config-dir "/" bundle-name "/package.json")
my-pretty-printer (cheshire/create-pretty-printer
(assoc cheshire/default-pretty-print-options
:indent-arrays? true))
npm-deps (assoc npm-deps "shadow-cljs" "^2.8.80")
config {:dependencies npm-deps}]
(spit filename (cheshire/generate-string config {:pretty my-pretty-printer}))))

reagent 1.0

possibly fucks up a lot of dom related stuff.

lein outdated

lein outdated is better than lein ancient.
but it leads to shadow-cljs not compiling.

Gzip

Check if resource path is gzipped
Importsnt for remote web servers.

css-loader

css reload component is not hiding css view,
when css theme is changed, after css theme was loaded once successfully.

this effects notebook / codemirror theme change.

:webly/before-reload

For webly watch:

dispatch :webly/before-reload

-> gorilla-ui needs to reset the exampleatom, so that examples are not loaded 2x / 3x / 4x

slf4j-timbre not working with SLF4J 12.0

Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/home/andreas/.m2/repository/com/fzakaria/slf4j-timbre/0.3.21/slf4j-timbre-0.3.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]

serialization

transit - fast, but not for persistence
edn - slow but good for persistence
Nippy is an attempt to provide a reliable, high-performance drop-in alternative to the reader.

  • rest api
  • websocket.
  • database
  • notebook serialization.

; extend edn reader:

(def ^:private default-readers {'ig/ref ref, 'ig/refset refset})
(defn read-string "Read a config from a string of edn. Refs may be denotied by tagging keywords with #ig/ref." ([s] (read-string {:eof nil} s)) ([opts s] (let [readers (merge default-readers (:readers opts {}))] (edn/read-string (assoc opts :readers readers) s))))

jetty / httpkit / integrant

the (require '[]) does not work.
idea is to only roll out jetty as dependency,
and have the others added in the user project.

ring-handler registry .. phase out!

Webly handler registry phase out.

we need to do all resolving-requires at startup.
this way we fail when we start an server that has an undefined handler.

Websocket move out

After webserver move-out
Deps
-encoding (websocket)
-permission
-webserver

Oauth2 move-out

This is a goldly plugin.
... can export ring-handlers and websocket-handler.
Dont use keywords in routing
Check
Documentation ... if use lib then config setting

try ports

(defn- try-ports [func ports] (try (func (first ports)) (catch BindException ex (if-let [ports (next ports)] (try-ports func ports) (throw ex)))))
(def suitable-ports (range 3000 3011))

file / resources caching

jetty is not caching static files.
the notebook app would load much faster if the full bundle is not always sent in full.

logging

(defn init-log []
(timbre/set-config! [:appenders :standard-out :min-level] :warn))

log to file

config template

(def ^:private template-resolver-defaults
{:prefix "public/"
:suffix ".html"
:cacheable false
:cache-ttl-ms 0})

todo

Webly: Frontend config .. remove backend routes.

Spa move-out

Spa-page html
-Websocket
-Webserver
-Handler api/app
-oauth2
-loading
-css-manager

  • goog-analytics
  • dialog

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.