Let's say you want to use cljs.js
to eval
code using functions declared in your project.
Expressions that only use core functions are simple to evaluate:
(ns foo.try-eval
(:require [cljs.js :as cljs]))
(def compiler-state (cljs/empty-state))
(ns metosin.common.edn | |
#+clj | |
(:require [clj-time.format :as f]) | |
#+cljs | |
(:require [cljs-time.format :as f] | |
cljs.reader) | |
#+clj (:import [org.joda.time DateTime LocalDate])) | |
;; | |
;; #DateTime tagging |
;; material-ui.macros.clj | |
(ns material-ui.macros) | |
(def material-tags | |
'[AppBar | |
AppCanvas | |
Circle | |
Checkbox | |
DatePicker | |
DialogWindow |
(ns datatable.core | |
(:require [reagent.core :as reagent] | |
[cljsjs.fixed-data-table])) | |
(def Table (reagent/adapt-react-class js/FixedDataTable.Table)) | |
(def Column (reagent/adapt-react-class js/FixedDataTable.Column)) | |
(defn gen-table | |
"Generate `size` rows vector of 4 columns vectors to mock up the table." | |
[size] |
__ __ | |
/ \ / | | |
λλ \ ______ ______ λλ/ | |
λλ \ / \ / \ / | | |
λλ \ λλλλλλ |/λλλλλλ |λλ | | |
λλ \ / λλ |λλ | λλ |λλ | | |
λλλλ \ /λλλλλλλ |λλ |__λλ |λλ | | |
λλ/ λλ |λλ λλ |λλ λλ/ λλ | | |
λλ/ λλ/ λλλλλλλ/ λλλλλλλ/ λλ/ | |
λλ | |
Let's say you want to use cljs.js
to eval
code using functions declared in your project.
Expressions that only use core functions are simple to evaluate:
(ns foo.try-eval
(:require [cljs.js :as cljs]))
(def compiler-state (cljs/empty-state))
#!/bin/bash | |
rm *.jks 2> /dev/null | |
rm *.pem 2> /dev/null | |
echo "====================================================" | |
echo "Creating fake third-party chain root -> ca" | |
echo "====================================================" | |
# generate private keys (for root and ca) |
purgecss is a tool for removing unused css classes from source files. It's particularly useful for functional css frameworks like tachyons, where it's normal to only use a tiny fraction of available classes. This gist contains example code you could use to add purgecss to a shadow-cljs build.
yarn add purgecss
first(hooks/purge-css {:css-source __ :js-globs __ :out-dir __})
:css-source
is the path to the original, bloated CSS file (from project root). This is ideally in a source directory, or node_modules
as in this example. This cannot be the public path where the css is ultimately read.:js-globs
is a string / vector of strings, indicating which files to read as input. These should be all of your compiled javascript bundles which contain your views. purgecss
does a brute-force parse of all these files, extracting all the strings to figure out which clasSince the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.
This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).
// MIT License | |
// | |
// Copyright (c) 2021 Matthijs Steen | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |