Skip to content

Instantly share code, notes, and snippets.

View baldurbjarnason's full-sized avatar

Baldur Bjarnason baldurbjarnason

View GitHub Profile
@baldurbjarnason
baldurbjarnason / README.md
Last active February 13, 2023 13:56
Book production files for Out of the Software Crisis

Book production files

For Out of the Software Crisis.

These are under the MIT License. Do what you want, essentially. Probably doesn't work out of the box. Uses Pandoc (version 2.19.2), zx, weasyprint, and Literata.

You'll need to download them for this to work. And you'll need to edit the build script to point at the correct CSS files. And you'l need to edit the CSS to point at the correct font files.

@baldurbjarnason
baldurbjarnason / Makefile
Last active September 28, 2021 12:51
node-less frontend testing using Firefox and TAP
.PHONY:test
test:
rm -rf ./my-profile; mkdir ./my-profile && echo "user_pref('devtools.console.stdout.content', true);user_pref('dom.allow_scripts_to_close_windows', true);user_pref('datareporting.policy.firstRunURL', '');" > ./my-profile/user.js && firefox --headless -profile ./my-profile -no-remote `pwd`/index.html | sed -n "/console.log: /p" | sed -e 's/console.log: "//' -e 's/"$$//' | ./tapview
# Running `make` will build the `js` target, transforming all of your .js files in `src` to es2016, saving them in `dist`
# Running `make production` will do the same but also minify the files.
js_files := $(shell find src -name "*.js" -print)
js_targets := $(addprefix dist/, $(js_files))
# target-specific esbuild flags
FLAGS := --sourcemap --target=es2016
production : FLAGS := --minify --sourcemap --target=es2016