https://github.com/o-az/template-ts
Node.js TypeScript template for libraries
https://github.com/o-az/template-ts
modern-javascript nodejs template typescript
Last synced: 6 months ago
JSON representation
Node.js TypeScript template for libraries
- Host: GitHub
- URL: https://github.com/o-az/template-ts
- Owner: o-az
- License: mit
- Created: 2022-11-03T02:58:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-15T11:51:56.000Z (9 months ago)
- Last Synced: 2025-04-15T12:45:13.947Z (9 months ago)
- Topics: modern-javascript, nodejs, template, typescript
- Language: TypeScript
- Homepage:
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
_NOTE: You are welcome to ask any questions if anything is unclear. Also feel free to post a discussion_
# TypeScript / Node.js Template
_Requires __[Node.js LTS (v20 or later)](https://nodejs.org/en/blog/release/v20.8.1)__ and
**[pnpm __v8__ or higher](https://pnpm.io/installation)**_
---
## **Stack**
- `TypeScript`
- `pnpm` package manager
- `vitest` test runner
- `CommonJS` and `ESM` support
- [`tsdown`](https://github.com/rolldown/tsdown) for building (powered by [rolldown](https://github.com/rolldown/rolldown))
- `Biome` for linting and formatting
- CI with GitHub Actions
- Publish to `npm` registry, GitHub Packages, Docker Hub and GitHub Container Registry with `pnpm` (see `publish.yml`)
### - VSCode ready (see `.vscode`)
---
## Getting started
### Clone repository
```sh
## using github cli
gh repo clone o-az/template-ts && cd template-ts
```
### Install dependencies
```sh
pnpm install
```
### Copy `.env.example` to `.env` and modify as needed
```sh
cp .env.example .env
```
### Run development server
```sh
pnpm dev
```
### run tests
```sh
pnpm test
```
### run build and start production server
```sh
pnpm build && pnpm start
```
### to run a one-off TypeScript file
```sh
node --import=tsx path/to/file.ts
```
### Publish Package
_This will trigger publish workflow in GitHub Actions_
```sh
pnpm release
```
#### select version, it will create git tags and push to remote
### Lastly, you should modify the workflows in .github/workflows to suit your needs