-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
59 lines (45 loc) · 1.7 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# A 440x280 small tile icon that will be displayed on the Chrome Web Store wall.
# At least one 1280x800 or 640x400 screenshot (Chrome)
# Promotional Image 300x188px in case Opera editors decide to feature the extension as a recommended extension
#
# Icons:
# 128x128 - def
# 64x64 - Opera media
# 48x48 - (chrome://extensions)
# 32x32 - Windows
# 16x16 - favicon
# Install Hosted Web Apps (HWA) Command Line Interface (CLI)
# npm i -g hwa-cli
FILES=background.js content.js manifest.json options.html options.js edit.html edit.js img/icon-128.png img/icon-48.png img/icon-32.png
SAFARI_BUILD=json-lite.safariextension
.PHONY: safari edge
help:
# Usage:
@sed -n '/^\([a-z][^:]*\).*/s// make \1/p' $(MAKEFILE_LIST)
firefox:
-rm firefox.zip
git reset --hard
#sed -nie '/<!-- Firefox/{n;p;n;d;};p' options.html
sed -i '/\/\* Firefox/d' options.js background.js
sed -i '/options_page/d' manifest.json
sed -i '/persistent/d' manifest.json
zip firefox.zip $(FILES)
webextension:
-rm app.zip
git reset --hard
#sed -i '/<!-- Firefox/,/-->/d' options.html
sed -i '/\/\* Firefox/,/\*\//d' options.js background.js
sed -i '/webRequest/d;/applications/,/^ }/d' manifest.json
zip app.zip $(FILES)
safari:
rm -rf $(SAFARI_BUILD)
mkdir $(SAFARI_BUILD)
cp $(FILES) safari/* $(SAFARI_BUILD)/
ie: webextension
hwa convert app.zip
edge:
# https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/packaging/creating-and-testing-extension-packages#app-identity-template-values
manifoldjs -d edge -l debug -p edgeextension -f edgeextension -m ./manifest.json
# manifoldjs -l debug -p edgeextension package JSONLite/edgeextension/manifest/
icons:
convert -background none -resize 128x128 icon2.svg icon2-128.png