-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
154 lines (125 loc) · 3.69 KB
/
Copy pathjustfile
File metadata and controls
154 lines (125 loc) · 3.69 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
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[private]
default:
@just --list --unsorted --list-heading $'Available commands:\n'
set dotenv-load
vendor_dir := "vendor/react-notion-x"
[group('setup')]
[doc('Install runtime versions via asdf')]
asdf-install:
@echo "Installing specified runtime versions:"
@asdf install
@echo "Currently installed runtime versions:"
@asdf current
[group('setup')]
[doc('Create .env from .env.example if it does not exist')]
env-init:
@if [ ! -e .env ]; then \
cp .env.example .env; \
echo "Created .env file. Please edit it according to your setup."; \
fi
[group('setup')]
[doc('Install dependencies')]
deps-install:
@pnpm install
[group('setup')]
[doc('Install dependencies with a frozen lockfile (CI/production)')]
deps-install-frozen:
@pnpm install --frozen-lockfile
[group('setup')]
[doc('Install pre-commit hooks')]
pre-commit-init:
@pre-commit install -t pre-commit -t commit-msg
[group('setup')]
[doc('Initialize local environment for development')]
setup-init: asdf-install env-init deps-install pre-commit-init
[group('vendor')]
[doc('Build the react-notion-x submodule')]
vendor-build:
@git submodule update --init --recursive
@pnpm --dir {{ vendor_dir }} install
@pnpm --dir {{ vendor_dir }} build
[group('app')]
[doc('Run the development server')]
app-dev: vendor-build
@pnpm dev
[group('app')]
[doc('Build the application for production')]
app-build: vendor-build
@pnpm build
[group('app')]
[doc('Start the production server')]
app-start: app-build
@pnpm start
[group('quality')]
[doc('Run the linter')]
code-lint:
@pnpm lint
[group('quality')]
[doc('Run the formatter')]
code-format:
@pnpm format
[group('quality')]
[doc('Update pre-commit hooks to latest versions')]
pre-commit-update:
@pre-commit autoupdate
[group('quality')]
[doc('Run pre-commit hooks against all files')]
pre-commit-run:
@pre-commit run --all-files
[group('supabase')]
[doc('Start Supabase containers')]
supabase-start:
@supabase start
[group('supabase')]
[doc('Stop Supabase containers')]
supabase-stop:
@supabase stop
[group('supabase')]
[doc('Check Supabase status')]
supabase-status:
@supabase status
[group('supabase')]
[doc('Reset Supabase database (wipe + re-apply migrations and seeds)')]
supabase-reset:
@supabase db reset
[group('supabase')]
[doc('Create a new Supabase migration')]
supabase-create-migration name:
@supabase migration new {{ name }}
[group('supabase')]
[doc('Create migration by diffing local against remote schema')]
supabase-db-diff name:
@supabase db diff --use-migra -f {{ name }}
[group('supabase')]
[doc('Generate TypeScript types from Supabase schema')]
supabase-generate-types:
@supabase gen types typescript --local > src/integrations/supabase/database.types.ts
[group('ngrok')]
[doc('Run ngrok for the development server')]
ngrok-dev:
@ngrok http 3000
[group('ngrok')]
[doc('Run ngrok for the production server')]
ngrok-prod:
@ngrok http 55203
[group('security')]
[doc('Create the .secrets.baseline file')]
detect-secrets-create-baseline:
@detect-secrets scan > .secrets.baseline
[group('security')]
[doc('Audit updates to .secrets.baseline')]
detect-secrets-audit:
@detect-secrets audit .secrets.baseline
[group('security')]
[doc('Scan repository for secrets')]
detect-secrets-scan:
@detect-secrets scan --baseline .secrets.baseline
[group('misc')]
[doc('Clean build artifacts and dependencies')]
repo-clean:
@echo "Cleaning project..."
@rm -rf node_modules .next
@find {{ vendor_dir }} -type d -name 'node_modules' -exec rm -rf {} +
@find {{ vendor_dir }} -type d -name 'build' -exec rm -rf {} +
@find {{ vendor_dir }} -type d -name '.turbo' -exec rm -rf {} +
@echo "Done."