#!/bin/sh
# Upstream's build script is "tsc && npm run minify".
#
# dh-nodejs does not run the TypeScript compiler on its own, so it is invoked
# here, with debian/nodejs/tsconfig.build.json (which narrows the build down
# to the library).  The minified copies listed in package.json#files are then
# produced by upstream's own script; uglify-js, which it requires, is made
# available in node_modules by debian/nodejs/extlinks.
set -e

tsc --project debian/nodejs/tsconfig.build.json
node scripts/minify.js
