mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 09:16:30 -05:00
3d4f8276ae
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
34 lines
537 B
Bash
Executable file
34 lines
537 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
|
|
set -e
|
|
|
|
echo "🦔 > Clear dist directory.."
|
|
rm -rf dist
|
|
|
|
echo "🦔 > Compile to CJS.."
|
|
tsc --project tsconfig.cjs.json
|
|
|
|
echo "🦔 > Compile to ESM.."
|
|
tsc --project tsconfig.esm.json
|
|
|
|
echo "🦔 > Fix CJS package.json.."
|
|
cat > dist/cjs/package.json <<!EOF
|
|
{
|
|
"type": "commonjs"
|
|
}
|
|
!EOF
|
|
|
|
echo "🦔 > Fix ESM package.json.."
|
|
cat > dist/esm/package.json <<!EOF
|
|
{
|
|
"type": "module"
|
|
}
|
|
!EOF
|
|
|
|
echo "🦔 > Done!"
|