Skip to content

Commit

Permalink
fix: don't use GitHub API (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Mar 28, 2024
1 parent 83ebbe2 commit 7019a4b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 51 deletions.
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

0 comments on commit 7019a4b

Please sign in to comment.