mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
build(copy-trilium): use "build:prepare-dist" build script
This commit is contained in:
parent
d65281bfa5
commit
c89d86acb1
@ -12,29 +12,10 @@ if ! [[ $(which npm) ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Trigger the TypeScript build
|
# Trigger the build
|
||||||
echo TypeScript build start
|
echo Build start
|
||||||
npm run build:ts
|
npm run build:prepare-dist
|
||||||
echo TypeScript build finished
|
echo Build finished
|
||||||
|
|
||||||
# Copy the TypeScript artifacts
|
|
||||||
DIR="$1"
|
|
||||||
rm -rf "$DIR"
|
|
||||||
mkdir -pv "$DIR"
|
|
||||||
|
|
||||||
echo Webpack start
|
|
||||||
npm run build:webpack
|
|
||||||
echo Webpack finish
|
|
||||||
|
|
||||||
echo "Copying Trilium to build directory $DIR"
|
|
||||||
|
|
||||||
for d in 'images' 'libraries' 'src' 'db'; do
|
|
||||||
cp -r "$d" "$DIR"/
|
|
||||||
done
|
|
||||||
|
|
||||||
for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample.ini'; do
|
|
||||||
cp "$f" "$DIR"/
|
|
||||||
done
|
|
||||||
|
|
||||||
# Patch package.json main
|
# Patch package.json main
|
||||||
sed -i 's/.\/dist\/electron-main.js/electron-main.js/g' "$DIR/package.json"
|
sed -i 's/.\/dist\/electron-main.js/electron-main.js/g' "$DIR/package.json"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user