diff --git a/package.json b/package.json index 0fe3f59..21c72ab 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "build": "rimraf ./dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json", - "prepare": "pnpm build" + "prepare": "pnpm build", + "test": "vitest" }, "keywords": [], "author": "", diff --git a/tsconfig.build.json b/tsconfig.build.json index 9f34180..d8f72e1 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,10 +1,10 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "rootDir": "./src", + "rootDir": "./lib", }, "exclude": [ - "tests/**/*", + "*.test.ts", "vitest.config.ts", ] } diff --git a/tsconfig.json b/tsconfig.json index 3318180..2389261 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "baseUrl": "./", "paths": { "@/*": [ - "./src/*" + "lib/*" ] }, "plugins": [ @@ -31,10 +31,12 @@ "transform": "typescript-transform-paths", "afterDeclarations": true } + ], + "typeRoots": [ + "lib/types" ] }, "include": [ - "src/**/*", - "tests/**/*", + "lib/**/*", ], } diff --git a/vitest.config.ts b/vitest.config.ts index e9232c4..a7230d1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ resolve: { alias: { - '@': path.resolve(__dirname, './src'), + '@': path.resolve(__dirname, './lib'), }, }, test: {