From 9b4cd2ef2f9c4afcd7460c26679744d9d12e6b7e Mon Sep 17 00:00:00 2001 From: Dylan Duan Date: Wed, 8 Jan 2025 13:50:47 +0800 Subject: [PATCH] refactor: Rename src to lib --- api/cell-deps.ts | 2 +- {src => lib}/fetcher.ts | 0 {src => lib}/index.ts | 0 {src => lib}/typeid.ts | 0 package.json | 4 ++-- tsconfig.json | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename {src => lib}/fetcher.ts (100%) rename {src => lib}/index.ts (100%) rename {src => lib}/typeid.ts (100%) diff --git a/api/cell-deps.ts b/api/cell-deps.ts index e7b8252..c914c9d 100644 --- a/api/cell-deps.ts +++ b/api/cell-deps.ts @@ -1,6 +1,6 @@ import type { VercelRequest, VercelResponse } from '@vercel/node'; import { ZodError } from 'zod'; -import { fetchCellDeps } from "../src/fetcher" +import { fetchCellDeps } from "../lib/fetcher" export default async function handler(_req: VercelRequest, res: VercelResponse) { try { diff --git a/src/fetcher.ts b/lib/fetcher.ts similarity index 100% rename from src/fetcher.ts rename to lib/fetcher.ts diff --git a/src/index.ts b/lib/index.ts similarity index 100% rename from src/index.ts rename to lib/index.ts diff --git a/src/typeid.ts b/lib/typeid.ts similarity index 100% rename from src/typeid.ts rename to lib/typeid.ts diff --git a/package.json b/package.json index efff477..4d82929 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "type": "module", "scripts": { - "update:cellDeps": "npx tsx src/index.ts", - "format": "prettier --write '{src, api}/*.ts'", + "update:cellDeps": "npx tsx lib/index.ts", + "format": "prettier --write '{lib, api}/*.ts'", "lint": "eslint --ext .ts" }, "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index 5fdfd4d..5d03ff0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "skipLibCheck": true, "strict": true }, - "include": ["src", "api"], + "include": ["lib", "api"], "exclude": ["node_modules"], "ts-node": { "esm": true