docs.sheetjs.com/tests/static-eleventy.sh
2025-01-05 21:51:20 -05:00

23 lines
734 B
Bash
Executable File

#!/bin/bash
# https://docs.sheetjs.com/docs/demos/static/eleventy
# This script builds the Static Site. It does not test HMR!
cd /tmp
rm -rf sheetjs-11ty
mkdir sheetjs-11ty
cd sheetjs-11ty
npm init -y
mkdir _data
curl -Lo _data/pres.xlsx https://docs.sheetjs.com/pres.xlsx
curl -L -o .eleventy.js https://docs.sheetjs.com/eleventy/_eleventy.js
curl -LO https://docs.sheetjs.com/eleventy/index.njk
for n in 2.0.1 3.0.0; do
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz @11ty/eleventy@$n
npx @11ty/eleventy@$n
echo "Clinton" $(grep Clinton _site/index.html | wc -l) "BESSELJ" $(grep BESSELJ _site/index.html | wc -l) "JS" $(grep -F '.js' _site/index.html | wc -l)
# Expected output: Clinton 1 BESSELJ 0 JS 0
done