Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't use GitHub API #23

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions src/github.ts

This file was deleted.

17 changes: 15 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import prompts from 'prompts'
import tiged from 'tiged'
import yargsParser from 'yargs-parser'
import { version } from '../package.json'
import { viaContentsApi } from './github.js'
import { projectDependenciesHook } from './hook'
import { afterCreateHook } from './hooks/after-create'
import { registerInstallationHook } from './hooks/dependencies'
Expand All @@ -19,6 +18,21 @@ const config = {
ref: 'main',
}

const templateDirs = [
'templates/aws-lambda',
'templates/bun',
'templates/cloudflare-pages',
'templates/cloudflare-workers',
'templates/deno',
'templates/fastly',
'templates/lambda-edge',
'templates/netlify',
'templates/nextjs',
'templates/nodejs',
'templates/vercel',
'templates/x-basic',
]

function mkdirp(dir: string) {
try {
fs.mkdirSync(dir, { recursive: true })
Expand All @@ -37,7 +51,6 @@ async function main() {

const templateArg = args.template

const templateDirs = await viaContentsApi(config)
const templates: Record<string, { name: string }> = {}

templateDirs.forEach((dir) => {
Expand Down
Loading