#!/bin/sh

set -e
# --ignoreConfig: tsconfig.json is only meant for the lint/typecheck pass
# (it sets noEmit) and tsc 6 refuses to ignore it silently (TS5112).
# The module resolution is spelled out because dropping the deprecated
# "node" value changes the default (TS5107).
tsc --ignoreConfig src/dedent.ts --outDir build-mjs --target ES2022 --moduleResolution bundler --module EsNext --declaration true
tsc --ignoreConfig src/dedent.ts --outDir build-cjs --target ES2022 --module CommonJS --declaration true
rollup -c debian/nodejs/rollup.config.mjs
