-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
29 lines (25 loc) · 1.2 KB
/
build
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
#!/bin/bash
# can't just use an svg cause, unlike Firefox, Chrome has had a bug since 2009 where extension icons don't recognize svgs
# source: https://bugs.chromium.org/p/chromium/issues/detail?id=29683
echo "Creating pngs from svg"
for size in 16 25 32 48 64 96 128; do
inkscape icons/icon.svg -e icons/icon_"$size".png -w "$size" -h "$size"
done
# install dependencies - might need to run the build script in sudo cause for me at least WSL makes things weird
echo "Running npm install to get dependencies"
npm install
# don't wanna duplicate libraries in this repo (and haven't figured out how to use proper build/packaging tools yet), so gotta move it from the node area to someplace accessible
echo "Copying libraries into /lib"
mkdir -p lib/
cp node_modules/webextension-polyfill/dist/browser-polyfill.js lib/
cp node_modules/linkifyjs/dist/linkify.js lib/
cp node_modules/linkifyjs/dist/linkify-element.js lib/
cp node_modules/showdown/dist/showdown.js lib/
cp node_modules/dompurify/dist/purify.js lib/
cp node_modules/deepmerge/dist/umd.js lib/
echo "'Compiling' readme"
cat readme/readme.md > README.md
echo >> README.md
echo "----" >> README.md
echo >> README.md
cat readme/permissions_explanation.md >> README.md