-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (55 loc) · 1.66 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
58
59
60
61
62
63
64
# Makefile for Jan Electron App - Build, Lint, Test, and Clean
# Default target, does nothing
all:
@echo "Specify a target to run"
# Builds the UI kit
build-uikit:
ifeq ($(OS),Windows_NT)
cd uikit && yarn config set network-timeout 300000 && yarn install && yarn build
else
cd uikit && yarn install && yarn build
endif
# Installs yarn dependencies and builds core and extensions
install-and-build: build-uikit
ifeq ($(OS),Windows_NT)
yarn config set network-timeout 300000
endif
yarn build:core
yarn install
yarn build:extensions
dev: install-and-build
yarn dev
# Linting
lint: install-and-build
yarn lint
# Testing
test: lint
yarn build:test
yarn test
# Builds and publishes the app
build-and-publish: install-and-build
yarn build:publish
# Build
build: install-and-build
yarn build
clean:
ifeq ($(OS),Windows_NT)
powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist -Recurse -Directory | Remove-Item -Recurse -Force"
rmdir /s /q "%USERPROFILE%\AppData\Roaming\jan"
rmdir /s /q "%USERPROFILE%\AppData\Roaming\jan-electron"
rmdir /s /q "%USERPROFILE%\AppData\Local\jan*"
else ifeq ($(shell uname -s),Linux)
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name ".next" -type d -exec rm -rf '{}' +
find . -name "dist" -type d -exec rm -rf '{}' +
rm -rf "~/.config/jan"
rm -rf "~/.config/jan-electron"
rm -rf "~/.cache/jan*"
else
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name ".next" -type d -exec rm -rf '{}' +
find . -name "dist" -type d -exec rm -rf '{}' +
rm -rf ~/Library/Application\ Support/jan
rm -rf ~/Library/Application\ Support/jan-electron
rm -rf ~/Library/Caches/jan*
endif