Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ mkdir -p $OUTDIR/lib/streams
cp node_modules/@openpgp/web-stream-tools/lib/*.js $OUTDIR/lib/streams
# patch imports with .js, e.g. replace './streams' with './streams.js'
# until https://github.com/openpgpjs/web-stream-tools/pull/20 is resolved
sed -i.bak -E "s/'\.\/(streams|util|writer|reader|node-conversions)'/'\.\/\1\.js'/g" $OUTDIR/lib/streams/*
STREAMS_REGEX="s/'\.\/(streams|util|writer|reader|node-conversions)'/'\.\/\1\.js'/g"
STREAMS_FILES=$OUTDIR/lib/streams/*
if [[ "$OSTYPE" =~ ^darwin ]]; then # macOS needs additional parameter for backup files
sed -i '' -E $STREAMS_REGEX $STREAMS_FILES
else
sed -i -E $STREAMS_REGEX $STREAMS_FILES
fi

# to update node-forge library, which is missing the non-minified version in dist, we have to build it manually
# cd ~/git && rm -rf ./forge && git clone https://github.com/digitalbazaar/forge.git && cd ./forge && npm install && npm run-script build
Expand Down