Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pavel-durov/project.template.ts

Template for TypeScript projects
https://github.com/pavel-durov/project.template.ts

Last synced: about 1 month ago
JSON representation

Template for TypeScript projects

Awesome Lists containing this project

README

        

# TypeScript Template

## Getting started

```shell
$ npm install
```

## Run

```shell
$ tsx src/index.ts
```

## Build

```shell
$ npm run build
```

## Test
```shell
$ npm run test
```

## Lint

```shell
$ npm run lint # lint check
$ npm run lint:fix # lint write
```

## Git hooks

### Tests

```shell
npx husky add .husky/pre-commit "npm test"
npx husky add .husky/pre-commit "npm run lint"
git add .husky/pre-commit
```

### Commit message

```shell
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
npm pkg set scripts.commitlint="commitlint --edit"
npx husky add .husky/commit-msg 'npm run commitlint ${1}'
```