Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reveal.JS download script
#!/bin/bash
set -e
REVEAL_VERSION="${REVEAL_VERSION:-3.8.0}"
REVEAL_DIR="${REVEAL_DIR:-reveal}"
curl -s "https://api.cdnjs.com/libraries/reveal.js" | jq -r ".assets | .[] | select(.version == \"${REVEAL_VERSION}\") | .files | .[]" | xargs -I {} dirname {} | uniq | xargs -I {} mkdir -p "${REVEAL_DIR}/{}"
curl -s "https://api.cdnjs.com/libraries/reveal.js" | jq -r ".assets | .[] | select(.version == \"${REVEAL_VERSION}\") | .files | .[]" | xargs -I {} curl -qs -o "${REVEAL_DIR}/{}" "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0/{}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment