FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AnswerOverflow/scripts/setup-context.ts at main · AnswerOverflow/AnswerOverflow · GitHub
AnswerOverflow
/
AnswerOverflow
Public
Notifications
You must be signed in to change notification settings
Fork
102
Star
2k
Code
Issues
23
Pull requests
14
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
AnswerOverflow
/
scripts
/
setup-context.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (56 loc) · 1.78 KB
Breadcrumbs
AnswerOverflow
/
scripts
/
setup-context.ts
Copy path
File metadata and controls
66 lines (56 loc) · 1.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!/usr/bin/env bun
import
{
existsSync
,
mkdirSync
}
from
"node:fs"
;
import
{
join
}
from
"node:path"
;
import
{
$
}
from
"bun"
;
const
CONTEXT_DIR
=
join
(
import
.
meta
.
dir
,
".."
,
".context"
)
;
const
REPOS
=
[
{
name
:
"effect"
,
url
:
"https://github.com/Effect-TS/effect.git"
}
,
{
name
:
"AnswerOverflow"
,
url
:
"https://github.com/AnswerOverflow/AnswerOverflow.git"
,
}
,
{
name
:
"github-search-agent"
,
url
:
"https://github.com/RhysSullivan/github-search-agent.git"
,
}
,
{
name
:
"better-auth"
,
url
:
"https://github.com/get-convex/better-auth.git"
,
}
,
{
name
:
"convex-backend"
,
url
:
"https://github.com/get-convex/convex-backend.git"
,
}
,
{
name
:
"convex-js"
,
url
:
"https://github.com/get-convex/convex-js.git"
}
,
{
name
:
"tweakcn"
,
url
:
"https://github.com/jnsahaj/tweakcn.git"
}
,
{
name
:
"effect-atom"
,
url
:
"https://github.com/tim-smart/effect-atom.git"
,
}
,
{
name
:
"ai-elements"
,
url
:
"https://github.com/vercel/ai-elements.git"
}
,
{
name
:
"vercel-ai"
,
url
:
"https://github.com/vercel/ai.git"
}
,
{
name
:
"posthog-com"
,
url
:
"https://github.com/PostHog/posthog.com.git"
}
,
{
name
:
"posthog"
,
url
:
"https://github.com/PostHog/posthog.git"
}
,
]
;
async
function
main
(
)
{
if
(
!
existsSync
(
CONTEXT_DIR
)
)
{
mkdirSync
(
CONTEXT_DIR
,
{
recursive
:
true
}
)
;
}
console
.
log
(
`Setting up
${
REPOS
.
length
}
context repositories...\n`
)
;
for
(
const
repo
of
REPOS
)
{
const
repoPath
=
join
(
CONTEXT_DIR
,
repo
.
name
)
;
if
(
existsSync
(
repoPath
)
)
{
console
.
log
(
`✓
${
repo
.
name
}
(already exists)`
)
;
continue
;
}
console
.
log
(
`Cloning
${
repo
.
name
}
...`
)
;
try
{
await
$
`git clone --depth 1
${
repo
.
url
}
${
repoPath
}
`
.
quiet
(
)
;
console
.
log
(
`✓
${
repo
.
name
}
`
)
;
}
catch
(
_error
)
{
console
.
error
(
`✗
${
repo
.
name
}
- failed to clone`
)
;
}
}
console
.
log
(
"\nContext setup complete!"
)
;
}
main
(
)
;
Back
|
FazBrowse Home
|
New Git URL