diff --git a/README.md b/README.md index 4e4f2c5..9d04ab4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Logo

- Welcome to the Bun project template repository! This template provides a starting point for creating new projects using [bun](https://bun.sh/). With bun, you can quickly build modern JavaScript and TypeScript applications. ## Features @@ -47,34 +46,36 @@ Start building your Bun project by modifying the index.ts file and adding your a ### Linting To lint your code: + ``` bun lint ``` -### Tesing +### Testing To run tests: + ``` bun test ``` - ## Directory Structure + The project template follows a typical directory structure for Bun projects: - `index.ts`: The entry point for your application. -src/: Directory for your application source code. -tests/: Directory for your tests. + src/: Directory for your application source code. + tests/: Directory for your tests. - `.eslintrc.cjs`: ESLint configuration file. - `package.json`: Project configuration, including scripts and dependencies. - `/modules`: Contains the modules you are creating - `/types`: Contains TypeScript types that are shared across your repository - `/test`: Contains tests for the modules you have created - ## Contributing + If you have suggestions, bug reports, or would like to contribute to this project template, please open an issue or submit a pull request on the GitHub repository. ## License -This project is licensed under the MIT License - see the LICENSE file for details. +This project is licensed under the MIT License - see the LICENSE file for details. diff --git a/package.json b/package.json index 74ca591..c1fc9ff 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "start": "bun index.ts", "test": "bun test", - "lint": "eslint . " + "lint": "eslint . ", + "build:tsc": "tsc --outDir ./dist" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.7.0", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..0d5833a --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "dist", + "declarationDir": "dist/types" + }, + "include": ["index.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/tsconfig.json b/tsconfig.json index 1830bed..8380d27 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,10 @@ "moduleResolution": "bundler", "moduleDetection": "force", "allowImportingTsExtensions": true, - "noEmit": true, + "emitDeclarationOnly": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "declaration": true, "composite": true, "strict": true, "downlevelIteration": true, @@ -16,9 +19,7 @@ "allowJs": true, "types": [ "bun-types" // add Bun global - ], - "paths": { - "@/*": ["./*"] - } - } + ] + }, + "exclude": ["node_modules", "dist"] }