-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 1.01 KB
/
Makefile
File metadata and controls
36 lines (27 loc) · 1.01 KB
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=codex-meter
DOMAIN=slobbe.github.io
VERSION=$(shell node -p "require('./package.json').version")
TAG_VERSION=v$(VERSION)
ZIP=$(NAME)@$(DOMAIN)-$(TAG_VERSION).zip
TS_SOURCES=$(shell find . -path ./dist -prune -o -path ./node_modules -prune -o -name "*.ts" -print)
.PHONY: all pack install clean
all: dist/extension.js
node_modules/.package-lock.json: package.json
npm install
dist/extension.js dist/prefs.js &: node_modules/.package-lock.json $(TS_SOURCES)
rm -rf dist
npm run build
schemas/gschemas.compiled: schemas/org.gnome.shell.extensions.$(NAME).gschema.xml
glib-compile-schemas schemas
$(ZIP): dist/extension.js dist/prefs.js schemas/gschemas.compiled metadata.json src/stylesheet.css icons/codex-symbolic.svg icons/openai-symbolic.svg
@cp -r schemas dist/
@cp -r icons dist/
@cp metadata.json dist/
@cp src/stylesheet.css dist/stylesheet.css
@rm -f $(ZIP)
@(cd dist && zip ../$(ZIP) -9r .)
pack: $(ZIP)
install: $(ZIP)
gnome-extensions install --force $(ZIP)
clean:
@rm -rf dist node_modules $(ZIP)