-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcompile.sh
36 lines (32 loc) · 843 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
NAME=$(cat package.json | jq -r '.name')
DISPLAY_NAME=$(cat package.json | jq -r '.displayName')
DESCRIPTION=$(cat package.json | jq -r '.description')
VERSION=$(cat package.json | jq -r '.version')
LICENSE=$(cat package.json | jq -r '.license')
AUTHOR=$(cat package.json | jq -r '.author.name')
AUTHOR_EMAIL=$(cat package.json | jq -r '.author.email')
PKG=$(cat package.json | jq -r '.homepage')
BANNER="/**
* $DISPLAY_NAME ($NAME)
*
* $DESCRIPTION
*
* @version $VERSION
* @license $LICENSE
* @author $AUTHOR <$AUTHOR_EMAIL>
* @pkg $PKG
*/"
mkdir -p tmp/ext
mkdir -p tmp/data
echo " Running esbuild..."
echo ""
echo "$BANNER"
node_modules/.bin/esbuild src/extension.ts \
--platform=node \
--bundle \
--format=cjs \
--target=es2020 \
--external:vscode \
--outfile=dist/extension.js \
--banner:js="$BANNER" \
"$@"