Project Layout

The HaTs project structure boosts productivity, promotes good habits, and it just works.

File System

Each time you bootstrap a project, the HaTs CLI shallow copies our TypeScript template repo on GitHub. Below is the default architecture generated.

┣ 📂src
┃ ┣ 📜index.test.ts
┃ ┗ 📜index.ts
┣ 📂tests
┃ ┗ 📜global.tests.ts
┣ 📜.eslintignore
┣ 📜.eslintrc.json
┣ 📜.gitignore
┣ 📜.prettierignore
┣ 📜
┣ 📜package-lock.json
┣ 📜package.json
┣ 📜tsconfig-build.json
┗ 📜tsconfig.json


During the bootstrapping process, the HaTs CLI customizes each file and directory for your project.

Take for example the raw contents of the tsconfig-build.json file from the default HaTs template project:

"compilerOptions": {
"extends": "./tsconfig.json"

Customizable values in template files are identifiable by the prefix 'HATS_' and written in all caps. The HaTs CLI identifies these placeholders and injects the appropriate values into your project.

Below is what your final tsconfig-build.json file may look like:

"compilerOptions": {
"rootDir": "src/"
"exclude": ["tests", "src/**/*.test.ts"],
"extends": "./tsconfig.json"
Edit this page on GitHub

Happy TypeScript
©2022 👨🏾‍💻 Kamar Mack