Skip to content

Instantly share code, notes, and snippets.


Andrea Richiardi arichiardi

View GitHub Profile
arichiardi / pom-deps-to-clj
Created Jun 3, 2019
Convert the output of mvn dependency:list to leiningen deps
View pom-deps-to-clj
#!/usr/bin/env bash
set -euo pipefail
# The following is the mvn dependency:list expected output
# [INFO] The following files have been resolved:
# [INFO] com.elasticpath.service.tenant:tenant-service-model:jar:1.0-SNAPSHOT:compile
# [INFO] com.elasticpath.service.tenant:tenant-service-dao:jar:1.0-SNAPSHOT:compile
arichiardi / shadow-build.clj
Created Mar 20, 2019
Shadow-cljs cljs deps.edn hook
View shadow-build.clj
(ns user.shadow-build
(:require [cheshire.core :as json]
[ :as io]))
(def ^:private package-json-path "package.json")
(def ^:private deps-edn-path "src/deps.cljs")
(defn deps-cljs
{:npm-deps (get package-json-edn "dependencies" {})})
arichiardi / install-ci-deps
Created Aug 8, 2018
Script for installing clojure tooling and lumo on ci
View install-ci-deps
#!/usr/bin/env sh
set -eu
if [ -z "$prefix_dir" ]; then
echo "Must pass prefix dir as first parameter"
exit 1
arichiardi / test-cljs
Last active Jun 22, 2018
Running tests with olical/cljs-test-runner
View test-cljs
set -xeuo pipefail
export IS_LOCAL=true
export NODE_ENV=dev
main_cmd="clojure -Srepro -A:cljs-jvm:test:dev -m cljs-test-runner.main \
arichiardi / package
Last active Jun 19, 2018
This is an example of how to bundle a ClojureScript artifact with webpack on node
View package
do_usage() {
echo "Package the zip ready for lambda deployment."
echo " -s is the stage, will default to dev is absent."
echo " -p accepts an dir path where the package will be copied, it defaults
to \"./.serverless\"".
echo " -B option skips compilation, in case you already have compiled
View gist:70392227f3edae2133557e1fddfd0384
./configure --with-pop --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets --enable-gtk-deprecation-warnings --with-xwidgets --with-x --with-wide-int

lumo logo

Lumo Unbundled

This is a proposal for creating a new package along with lumo-cljs containing all the un-bundled JavaScript files needed for the current lumo to work, like:

  • target/bundle.min.js
  • target/main.js
  • target/
arichiardi /
Created Mar 5, 2018
Dump the Clojure :npm-deps index
clojure -e "(require '[cljs.closure :as cc] '[clojure.pprint :refer [pprint]]) (pprint (cc/index-node-modules-dir $(cat cljsc_opts.edn)))" > npm-deps.edn
arichiardi / .bash_aliases
Last active May 16, 2018
Rebel and Canary ClojureScript
View .bash_aliases
alias clj-repl='function do_repl { clojure -J-Dclojure.server.repl="{:port ${1:-5555} :accept clojure.core.server/repl}" -A:rebel; }; do_repl'
alias cljs-node-repl='function do_repl { clojure -J-Dclojure.server.repl="{:port ${1:-5555} :accept cljs.server.node/repl}" -R:cljs-canary -A:rebel-cljs -m cljs.main -re node -r; }; do_repl'
View unrepl-blob-build.clj
(def deps '[[org.clojure/clojure "1.8.0"]
[lambdacd "0.13.2"]
[lambdaui "0.4.0" :exclusions [org.slf4j/slf4j-simple]]
[http-kit "2.2.0"]
[mount "0.1.11"]
[compojure "1.6.0"]
[org.clojure/clojure "1.8.0"]
[org.clojure/tools.logging "0.3.1"]
[cheshire "5.7.1"]
[ch.qos.logback/logback-core "1.2.3"]
You can’t perform that action at this time.