#!/bin/bash

# Expects the path to a Vega-Lite specification as the first argument.
# Passes remaining arguments to vg2png using npx.

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# only passes the first argument to vl2vg
$DIR/vl2vg $1 | npx vg2png '' ${@:2}
