Project starter template pre-configured with TypeScript, ESLint, Prettier, Jest, SWC, PNPM and more.
MIT License
Starter template for TypeScript projects. It comes pre-configured with the following features:
Simply, clone the TypeScript Project Starter Template to get started.
git clone https://github.com/pranav-kural/typescript-project-starter-template.git
Install the dependencies using PNPM:
pnpm install
Use SWC to compile your TypeScript code:
pnpm build
Pre-configured to output the compiled code to the lib
directory.
Run the compiled code:
pnpm start
Pre-configured to run the index.js
file in the lib
directory.
You can also use the dev
script instead when making changes to the source code. This script will compile your code and run it in watch mode:
pnpm dev
Pre-configured to watch the src
directory for changes and recompile the code automatically. Please that this uses tsx
and not swc
for compilation.
Pre-configured with Jest to run your tests. You can run the tests using the following command:
pnpm test
By default, Jest is configured to look for tests in src/tests
directory. You can change the configuration in the jest.config.js
file, along with any other Jest configurations you may want to change.
Pre-configured with ESLint to enforce code quality and consistency. You can run ESLint using the following command:
pnpm lint
Pre-configured with Prettier to format your code automatically. You can run Prettier using the following command:
pnpm format
An npm script predeploy
is defined the package.json
file to run the following in sequence:
lint
: Run ESLint to enforce code quality and consistency.format
: Run Prettier to format your code automatically.build
: Compile your TypeScript code using SWC.test
: Run Jest to ensure your code works as expected.pnpm predeploy
Pre-configured with GitHub Actions to run your tests and lint your code automatically on every push. You can find the workflow configuration in the .github/workflows
directory. Also, includes setup for dependabot to keep your dependencies up-to-date. Please note that, you may need to enable dependabot in your repository settings. Learn more about Dependabot.
After cloning the repository, you can update the remote URL to point to your repository, or remove the existing git commit history and start fresh.
Update the remote URL to point to your repository:
git remote set-url origin
Remove the existing git commit history and start fresh:
rm -rf .git
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin <your-repository-url>
git push -u origin main
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or bugs while using this project, please report them by following these steps: