export PATH := node_modules/.bin:$(PATH) build: static/main.js @echo "Building site" @zola build static/main.js: node_modules $(shell find src \( -type d -o \( -type f -a -regex ".*\.ml" \) \)) @echo "Building $@" @bsb -make-world @rollup --config rollup.config.js @terser $@ --output $@ --compress --mangle node_modules: package.json @bsb -init init @mv init/node_modules . @rm -rf init @npm install @touch -c node_modules clean: @echo "Cleaning" @rm -f static/main.js @rm -rf node_modules lib @find src -name '*.bs.js' -exec rm {} \;