#!/bin/sh

printf "// generated with build-style.sh\nexport default \`" > src/style.ts
node-sass vega-embed.scss >> src/style.ts
echo "\`;" >> src/style.ts

rollup -c

# Without rollup-plugin-ts, it's difficult to reproduce TS declaration build
cp debian/vega-embed.module.d.ts build/
#tsc --emitDeclarationOnly --declaration --moduleResolution node --declarationDir ./build
#mv build/src/index.d.ts `pkgjs-pjson . types`
#mv build/src/*.d.ts build/
#rmdir build/src
