Skip to content

Commit 1d3ae58

Browse files
chore: fix lint errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a28fc80 commit 1d3ae58

26 files changed

Lines changed: 477 additions & 387 deletions

bin/cli.ts

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bun
1+
#!/usr / bin / env bun
22

33
import type { GitItOptions } from '../src/types'
44
import { spawn } from 'node:child_process'
@@ -12,92 +12,92 @@ import { startShell } from '../src/utils'
1212
const cli = new CAC('gitit')
1313

1414
cli
15-
.command('[template] [dir]', 'Clone a template from a repository')
16-
.alias('clone [template] [dir]')
17-
.alias('create [template] [dir]')
18-
.alias('new [template] [dir]')
19-
.option('--template <template>', 'Template to clone')
20-
.option('--dir <dir>', 'Directory to clone the template into')
21-
.option('--force', 'Clone to existing directory even if exists')
22-
.option('--force-clean', 'Remove any existing directory or file recursively before cloning')
23-
.option('--shell', 'Open a new shell with current working directory')
24-
.option('--install', 'Install dependencies after cloning')
25-
.option('--command <command>', 'Custom command to run after template is cloned')
26-
.option('--auth <token>', 'Custom Authorization token to use for downloading template')
27-
.option('--cwd <dir>', 'Set current working directory to resolve dirs relative to it')
28-
.option('--offline', 'Do not attempt to download and use cached version')
29-
.option('--prefer-offline', 'Use cache if exists otherwise try to download')
30-
.option('--verbose', 'Show verbose debugging info')
31-
.example('gitit github:user/repo my-project')
32-
.example('gitit github:user/repo my-project --command "npm run dev"')
33-
.action(async (template?: string, dir?: string, options?: GitItOptions) => {
34-
if (!template) {
35-
console.error('Missing template argument')
36-
return
37-
}
15+
.command('[template] [dir]', 'Clone a template from a repository')
16+
.alias('clone [template] [dir]')
17+
.alias('create [template] [dir]')
18+
.alias('new [template] [dir]')
19+
.option('--template <template>', 'Template to clone')
20+
.option('--dir <dir>', 'Directory to clone the template into')
21+
.option('--force', 'Clone to existing directory even if exists')
22+
.option('--force-clean', 'Remove any existing directory or file recursively before cloning')
23+
.option('--shell', 'Open a new shell with current working directory')
24+
.option('--install', 'Install dependencies after cloning')
25+
.option('--command <command>', 'Custom command to run after template is cloned')
26+
.option('--auth <token>', 'Custom Authorization token to use for downloading template')
27+
.option('--cwd <dir>', 'Set current working directory to resolve dirs relative to it')
28+
.option('--offline', 'Do not attempt to download and use cached version')
29+
.option('--prefer-offline', 'Use cache if exists otherwise try to download')
30+
.option('--verbose', 'Show verbose debugging info')
31+
.example('gitit github:user/repo my-project')
32+
.example('gitit github:user/repo my-project --command "npm run dev"')
33+
.action(async (template?: string, dir?: string, options?: GitItOptions) => {
34+
if (!template) {
35+
console.error('Missing template argument')
36+
return
37+
}
3838

39-
if (options?.verbose) {
40-
process.env.DEBUG = process.env.DEBUG || 'true'
41-
}
39+
if (options?.verbose) {
40+
process.env.DEBUG = process.env.DEBUG || 'true'
41+
}
4242

43-
console.log(`Cloning template ${template}...`)
43+
console.log(`Cloning template ${template}...`)
4444

45-
// Set the current working directory if specified
46-
if (options?.cwd) {
47-
process.chdir(options.cwd)
48-
}
45+
// Set the current working directory if specified
46+
if (options?.cwd) {
47+
process.chdir(options.cwd)
48+
}
4949

50-
try {
51-
// Use the actual downloadTemplate function instead of placeholder
52-
const result = await downloadTemplate(template, {
53-
dir,
54-
force: options?.force,
55-
forceClean: options?.forceClean,
56-
offline: options?.offline,
57-
preferOffline: options?.preferOffline,
58-
auth: options?.auth,
59-
install: options?.install,
60-
})
50+
try {
51+
// Use the actual downloadTemplate function instead of placeholder
52+
const result = await downloadTemplate(template, {
53+
dir,
54+
force: options?.force,
55+
forceClean: options?.forceClean,
56+
offline: options?.offline,
57+
preferOffline: options?.preferOffline,
58+
auth: options?.auth,
59+
install: options?.install,
60+
})
6161

62-
const _to = relative(process.cwd(), result.dir) || './'
63-
console.log(`✨ Successfully cloned to \`${_to}\`\n`)
62+
const _to = relative(process.cwd(), result.dir) || './'
63+
console.log(`✨ Successfully cloned to \`${_to}\`\n`)
6464

65-
// Open a shell if requested
66-
if (options?.shell) {
67-
startShell(result.dir)
68-
}
65+
// Open a shell if requested
66+
if (options?.shell) {
67+
startShell(result.dir)
68+
}
6969

70-
// Run custom command if specified
71-
if (options?.command) {
72-
console.log(`Running command: ${options.command}`)
70+
// Run custom command if specified
71+
if (options?.command) {
72+
console.log(`Running command: ${options.command}`)
7373

74-
// Execute the command
75-
const [cmd, ...args] = options.command.split(' ')
76-
const child = spawn(cmd!, args, {
77-
cwd: result.dir,
78-
stdio: 'inherit',
79-
shell: true,
80-
})
74+
// Execute the command
75+
const [cmd, ...args] = options.command.split(' ')
76+
const child = spawn(cmd!, args, {
77+
cwd: result.dir,
78+
stdio: 'inherit',
79+
shell: true,
80+
})
8181

82-
// Wait for the command to finish
83-
await new Promise<void>((resolve, reject) => {
84-
child.on('close', (code) => {
85-
if (code === 0) {
86-
resolve()
87-
}
88-
else {
89-
reject(new Error(`Command exited with code ${code}`))
90-
}
91-
})
92-
child.on('error', reject)
82+
// Wait for the command to finish
83+
await new Promise < void > ((resolve, reject) => {
84+
child.on('close', (code) => {
85+
if (code === 0) {
86+
resolve()
87+
}
88+
else {
89+
reject(new Error(`Command exited with code ${code}`))
90+
}
9391
})
94-
}
95-
}
96-
catch (error) {
97-
console.error(`Error cloning template: ${error instanceof Error ? error.message : String(error)}`)
98-
process.exit(1)
92+
child.on('error', reject)
93+
})
9994
}
100-
})
95+
}
96+
catch (error) {
97+
console.error(`Error cloning template: ${error instanceof Error ? error.message : String(error)}`)
98+
process.exit(1)
99+
}
100+
})
101101

102102
cli.command('version', 'Show the version of the CLI').action(() => {
103103
console.log(version)

build.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { dts } from 'bun-plugin-dtsx'
22

3-
await Bun.build({
4-
entrypoints: ['src/index.ts', 'bin/cli.ts'],
5-
outdir: './dist',
6-
plugins: [dts()],
7-
target: 'node',
8-
})
3+
async function build(): Promise<void> {
4+
await Bun.build({
5+
entrypoints: ['src/index.ts', 'bin/cli.ts'],
6+
outdir: './dist',
7+
plugins: [dts()],
8+
target: 'node',
9+
})
10+
}
11+
12+
build()

docs/_data/team.js

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,102 @@
11
export const core = [
2-
{
3-
avatar: 'https://ca.slack-edge.com/TAFCQEYEP-UAFFN6YSE-fb28a6b5d278-512',
4-
name: 'Chris Breuer',
5-
title: 'Creator',
6-
org: 'Stacks',
7-
orgLink: 'https://stacksjs.org/',
8-
desc: 'Independent open source developer, builder in the Stacks ecosystem.',
9-
links: [
10-
{ icon: 'github', link: 'https://github.com/chrisbbreuer' },
11-
{ icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' },
12-
{ icon: 'twitter', link: 'https://twitter.com/chrisbbreuer' },
13-
],
14-
sponsor: 'https://github.com/sponsors/chrisbbreuer',
15-
},
16-
{
17-
avatar: 'https://avatars.githubusercontent.com/u/72235211',
18-
name: 'Blake Ayer',
19-
title: 'Cloud Genius',
20-
org: 'Stacks',
21-
orgLink: 'https://stacksjs.org/',
22-
desc: 'Core team member of Stacks.',
23-
links: [{ icon: 'github', link: 'https://github.com/blakeayer' }],
24-
sponsor: 'https://github.com/sponsors/blakeayer',
25-
},
26-
{
27-
avatar: 'https://avatars.githubusercontent.com/u/19656966',
28-
name: 'Zoltan',
29-
title: 'Desktop Wizard',
30-
org: 'Stacks',
31-
orgLink: 'https://stacksjs.org/',
32-
desc: 'Core team member of Stacks.',
33-
links: [{ icon: 'github', link: 'https://github.com/konkonam' }],
34-
sponsor: 'https://github.com/sponsors/konkonam',
35-
},
36-
{
37-
avatar: 'https://www.averyahill.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Favatar.626e0c07.jpg&w=128&q=75',
38-
name: 'Avery Hill',
39-
title: 'Merchandise & Event Planning',
40-
org: 'Stacks',
41-
orgLink: 'https://stacksjs.org/',
42-
desc: 'Core team member of Stacks.',
43-
links: [{ icon: 'github', link: 'https://www.averyahill.com/' }],
44-
},
45-
{
46-
avatar: 'https://avatars.githubusercontent.com/u/10015302',
47-
name: 'Harlequin Doyon',
48-
title: 'A collaborative being',
49-
org: 'Stacks',
50-
orgLink: 'https://stacksjs.org/',
51-
desc: 'Core team member of Stacks.',
52-
links: [{ icon: 'github', link: 'https://github.com/harlekoy' }],
53-
sponsor: 'https://github.com/sponsors/harlekoy',
54-
},
55-
{
56-
avatar: 'https://ca.slack-edge.com/TAFCQEYEP-UCX5LQ2NP-g16e383ecf66-512',
57-
name: 'Germaine Abellanosa',
58-
title: 'Social Tech Genius',
59-
org: 'Stacks',
60-
orgLink: 'https://stacksjs.org/',
61-
desc: 'Core team member of Stacks.',
62-
links: [{ icon: 'github', link: 'https://github.com/germikee' }],
63-
sponsor: 'https://github.com/sponsors/germikee',
64-
},
65-
{
66-
avatar: 'https://avatars.githubusercontent.com/u/58994540',
67-
name: 'Frederik Bußmann',
68-
title: 'A collaborative being',
69-
org: 'Stacks',
70-
orgLink: 'https://stacksjs.org/',
71-
desc: 'Core team member of Stacks.',
72-
links: [{ icon: 'github', link: 'https://github.com/freb97' }],
73-
sponsor: 'https://github.com/sponsors/freb97',
74-
},
75-
{
76-
avatar: 'https://avatars.githubusercontent.com/u/977413',
77-
name: 'Dorell James',
78-
title: 'A collaborative being',
79-
org: 'Stacks',
80-
orgLink: 'https://stacksjs.org/',
81-
desc: 'Core team member of Stacks.',
82-
links: [
83-
{ icon: 'github', link: 'https://github.com/dorelljames' },
84-
{ icon: 'twitter', link: 'https://twitter.com/dorelljames' },
85-
],
86-
sponsor: 'https://github.com/sponsors/dorelljames',
87-
},
88-
{
89-
avatar: 'https://avatars.githubusercontent.com/u/29087513',
90-
name: 'Glenn Michael',
91-
title: 'Desktop, Mobile, Web',
92-
org: 'Stacks',
93-
orgLink: 'https://stacksjs.org/',
94-
desc: 'Core team member of Stacks.',
95-
links: [{ icon: 'github', link: 'https://github.com/glennmichael123' }],
96-
sponsor: 'https://github.com/sponsors/glennmichael123',
97-
},
2+
{
3+
avatar: 'https://ca.slack-edge.com/TAFCQEYEP-UAFFN6YSE-fb28a6b5d278-512',
4+
name: 'Chris Breuer',
5+
title: 'Creator',
6+
org: 'Stacks',
7+
orgLink: 'https://stacksjs.org/',
8+
desc: 'Independent open source developer, builder in the Stacks ecosystem.',
9+
links: [
10+
{ icon: 'github', link: 'https://github.com/chrisbbreuer' },
11+
{ icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' },
12+
{ icon: 'twitter', link: 'https://twitter.com/chrisbbreuer' },
13+
],
14+
sponsor: 'https://github.com/sponsors/chrisbbreuer',
15+
},
16+
{
17+
avatar: 'https://avatars.githubusercontent.com/u/72235211',
18+
name: 'Blake Ayer',
19+
title: 'Cloud Genius',
20+
org: 'Stacks',
21+
orgLink: 'https://stacksjs.org/',
22+
desc: 'Core team member of Stacks.',
23+
links: [ { icon: 'github', link: 'https://github.com/blakeayer' }],
24+
sponsor: 'https://github.com/sponsors/blakeayer',
25+
},
26+
{
27+
avatar: 'https://avatars.githubusercontent.com/u/19656966',
28+
name: 'Zoltan',
29+
title: 'Desktop Wizard',
30+
org: 'Stacks',
31+
orgLink: 'https://stacksjs.org/',
32+
desc: 'Core team member of Stacks.',
33+
links: [ { icon: 'github', link: 'https://github.com/konkonam' }],
34+
sponsor: 'https://github.com/sponsors/konkonam',
35+
},
36+
{
37+
avatar: 'https://www.averyahill.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Favatar.626e0c07.jpg&w=128&q=75',
38+
name: 'Avery Hill',
39+
title: 'Merchandise & Event Planning',
40+
org: 'Stacks',
41+
orgLink: 'https://stacksjs.org/',
42+
desc: 'Core team member of Stacks.',
43+
links: [ { icon: 'github', link: 'https://www.averyahill.com/' }],
44+
},
45+
{
46+
avatar: 'https://avatars.githubusercontent.com/u/10015302',
47+
name: 'Harlequin Doyon',
48+
title: 'A collaborative being',
49+
org: 'Stacks',
50+
orgLink: 'https://stacksjs.org/',
51+
desc: 'Core team member of Stacks.',
52+
links: [ { icon: 'github', link: 'https://github.com/harlekoy' }],
53+
sponsor: 'https://github.com/sponsors/harlekoy',
54+
},
55+
{
56+
avatar: 'https://ca.slack-edge.com/TAFCQEYEP-UCX5LQ2NP-g16e383ecf66-512',
57+
name: 'Germaine Abellanosa',
58+
title: 'Social Tech Genius',
59+
org: 'Stacks',
60+
orgLink: 'https://stacksjs.org/',
61+
desc: 'Core team member of Stacks.',
62+
links: [ { icon: 'github', link: 'https://github.com/germikee' }],
63+
sponsor: 'https://github.com/sponsors/germikee',
64+
},
65+
{
66+
avatar: 'https://avatars.githubusercontent.com/u/58994540',
67+
name: 'Frederik Bußmann',
68+
title: 'A collaborative being',
69+
org: 'Stacks',
70+
orgLink: 'https://stacksjs.org/',
71+
desc: 'Core team member of Stacks.',
72+
links: [ { icon: 'github', link: 'https://github.com/freb97' }],
73+
sponsor: 'https://github.com/sponsors/freb97',
74+
},
75+
{
76+
avatar: 'https://avatars.githubusercontent.com/u/977413',
77+
name: 'Dorell James',
78+
title: 'A collaborative being',
79+
org: 'Stacks',
80+
orgLink: 'https://stacksjs.org/',
81+
desc: 'Core team member of Stacks.',
82+
links: [
83+
{ icon: 'github', link: 'https://github.com/dorelljames' },
84+
{ icon: 'twitter', link: 'https://twitter.com/dorelljames' },
85+
],
86+
sponsor: 'https://github.com/sponsors/dorelljames',
87+
},
88+
{
89+
avatar: 'https://avatars.githubusercontent.com/u/29087513',
90+
name: 'Glenn Michael',
91+
title: 'Desktop, Mobile, Web',
92+
org: 'Stacks',
93+
orgLink: 'https://stacksjs.org/',
94+
desc: 'Core team member of Stacks.',
95+
links: [ { icon: 'github', link: 'https://github.com/glennmichael123' }],
96+
sponsor: 'https://github.com/sponsors/glennmichael123',
97+
},
9898
]
9999

100100
export const emeriti = [
101-
//
101+
//
102102
]

0 commit comments

Comments
 (0)