| 1 | #!/bin/sh |
| 2 | # Upstream builds marked with esbuild (esbuild.config.js), using |
| 3 | # esbuild-plugin-umd-wrapper which is not packaged in Debian. Reproduce the |
| 4 | # shipped artifacts (ESM + browser bundle) with plain esbuild invocations. |
| 5 | set -e |
| 6 | esbuild src/marked.ts --bundle --format=esm --outfile=lib/marked.esm.js |
| 7 | esbuild src/marked.ts --bundle --format=iife --global-name=marked --outfile=lib/marked.umd.js |
| 8 | esbuild src/marked.ts --bundle --format=iife --global-name=marked --minify --outfile=lib/marked.umd.min.js |
| 9 | |
| 10 | # Generate the TypeScript declarations |
| 11 | tsc --declaration --emitDeclarationOnly --noEmit false --outDir lib --project tsconfig.json |
| 12 | sed -i "s/\.ts'/.js'/g" lib/*.d.ts |
| 13 | |
| 14 | marked-man man/marked.1.md > man/marked.1 |