Debian Codegraph @

debian/nodejs/build

raw
1 # Emit type declarations with tsc. The source has a few type-check errors that
2 # only appear with the older TypeScript in Debian (upstream uses TS >= 5.4's
3 # native NoInfer), so tolerate a non-zero exit: the .d.ts files are still
4 # emitted and the generated JavaScript is unaffected.
5 tsc -p tsconfig.json --noEmit false --emitDeclarationOnly --declaration \
6 --noEmitOnError false --outDir dist || true
7
8 # Build the dual CJS+ESM bundles (and bundle the declarations into types.d.ts).
9 rollup -c debian/rollup.config.mjs
10
11 # Remove the intermediate declaration tree left behind (upstream used
12 # rollup-plugin-delete for this); only the bundled dist/types.d.ts should ship.
13 rm -rf dist/lib dist/index.d.ts