pink-gorilla / webly Goto Github PK
View Code? Open in Web Editor NEWreagent/reframe application skelleton
reagent/reframe application skelleton
this needs to use the shadow-cljs analyzer to add namespace that is not referred to in code.
ad karma runner to build-cli
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.
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}))))
possibly fucks up a lot of dom related stuff.
lein outdated is better than lein ancient.
but it leads to shadow-cljs not compiling.
(try
(.browse (java.awt.Desktop/getDesktop) (java.net.URI. uri))
(<span class="pl-k">catch</span> java.awt.HeadlessException _))
https://github.com/sorenmacbeth/vizard/blob/master/src/clj/vizard/server.clj
Check if resource path is gzipped
Importsnt for remote web servers.
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.
For webly watch:
dispatch :webly/before-reload
-> gorilla-ui needs to reset the exampleatom, so that examples are not loaded 2x / 3x / 4x
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]
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.
; 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))))
https://github.com/pedestal/pedestal
pedestral might be a sensible server-side framework to be added to webly.
the (require '[]) does not work.
idea is to only roll out jetty as dependency,
and have the others added in the user project.
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.
After webserver move-out
Deps
-encoding (websocket)
-permission
-webserver
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
Webly: size report [npm-install compile size-report]
(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))
jetty is not caching static files.
the notebook app would load much faster if the full bundle is not always sent in full.
(defn init-log []
(timbre/set-config! [:appenders :standard-out :min-level] :warn))
log to file
(def ^:private template-resolver-defaults
{:prefix "public/"
:suffix ".html"
:cacheable false
:cache-ttl-ms 0})
Webly: Frontend config .. remove backend routes.
Spa-page html
-Websocket
-Webserver
-Handler api/app
-oauth2
-loading
-css-manager
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.