hedgedoc/markdown-it-plugins/build.sh
Tilman Vatteroth f5736dad0f feat: import markdown-it-plugins from https://github.com/hedgedoc/markdown-it-plugins
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-08-26 15:30:30 +02:00

34 lines
497 B
Bash
Executable file

#!/bin/bash
#
# 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!"