#!/bin/sh # Copies reveal.js into ./reveal.js so the deck works with no network. # index.html uses this copy when it exists and the CDN otherwise. Keep VERSION # in step with the one in index.html. set -eu VERSION=6.0.2 cd "$(dirname "$0")" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT npm pack "reveal.js@$VERSION" --pack-destination "$tmp" --silent >/dev/null 2>&1 tar -xzf "$tmp/reveal.js-$VERSION.tgz" -C "$tmp" rm -rf reveal.js mkdir -p reveal.js cp -R "$tmp/package/dist" reveal.js/dist cp "$tmp/package/LICENSE" reveal.js/LICENSE echo "reveal.js $VERSION vendored into $(pwd)/reveal.js ($(du -sh reveal.js | cut -f1))"