# typescript-dev-loop

> A toolbox package that helps you quickly setup and easily manage your typescript dev loop for your library

Latest version **0.1.5** (published 2023-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install typescript-dev-loop
pnpm add typescript-dev-loop
yarn add typescript-dev-loop
bun add typescript-dev-loop
```

Provides the commands `tdl-lint`, `tdl-test`, `tdl-build`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-01-10 |
| First published | 2022-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 15 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marek Pazik |
| Maintainers | mpazik |
| Keywords | toolbox, setup, typescript, lint, jest, prettier |

## Links

- npm: https://www.npmjs.com/package/typescript-dev-loop
- Repository: https://github.com/mpazik/typescript-dev-loop
- Homepage: https://github.com/mpazik/typescript-dev-loop#readme
- Issues: https://github.com/mpazik/typescript-dev-loop/issues
- npm.io page: https://npm.io/package/typescript-dev-loop

## Dependencies (15)

- [jest](https://npm.io/package/jest.md) ^29.3.1
- [eslint](https://npm.io/package/eslint.md) ^8.30.0
- [ts-jest](https://npm.io/package/ts-jest.md) ^29.0.3
- [prettier](https://npm.io/package/prettier.md) ^2.8.1
- [@swc/core](https://npm.io/package/@swc/core.md) ^1.3.25
- [@swc/jest](https://npm.io/package/@swc/jest.md) ^0.2.24
- [typescript](https://npm.io/package/typescript.md) ^4.9.4
- [@types/jest](https://npm.io/package/@types/jest.md) ^29.2.5
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.26.0
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.5.0
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.2.1
- [jest-environment-jsdom](https://npm.io/package/jest-environment-jsdom.md) ^29.3.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^5.47.0
- [eslint-plugin-unused-imports](https://npm.io/package/eslint-plugin-unused-imports.md) ^2.0.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^5.47.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2023-01-10
- 0.1.4 — 2023-01-10
- 0.1.3 — 2023-01-10
- 0.1.2 — 2022-12-25
- 0.1.1 — 2022-12-25
- 0.1.0 — 2022-12-25
- 0.0.10 — 2022-09-25
- 0.0.9 — 2022-05-03
- 0.0.8 — 2022-04-26
- 0.0.7 — 2022-04-26
- 0.0.6 — 2022-04-22
- 0.0.5 — 2022-04-22
- 0.0.4 — 2022-04-22
- 0.0.3 — 2022-04-22
- 0.0.2 — 2022-04-22
- … 1 more at https://npm.io/package/typescript-dev-loop/versions

## README

# Typescript dev loop
A toolbox package that helps you quickly set up and easily manage your typescript dev loop for your library.

Inspired by [lib-builder](https://github.com/TheUiTeam/lib-builder) and [ts-react-toolbox](https://github.com/zzarcon/ts-react-toolbox).


## What is included
- Typescript
- Jest
- Linter
- Prettier

## Limitations
It does not include any frameworks.

## Structure
The packet expect that your code will be in the `src` folder.
The build command will generate files in the `dist`. Files are compiled by as es-modules but there is `dist/cjs` directory with common-js modules. 

## Setup
Unfortunately, the setup is a bit more involved than you might expect, as each library does it differently and has its own limitation. Additionally, some dev environments require config files to be set up in the project's root directory.

If you know how the set-up process could be improved, please open an issue or pull a request. All ideas and contributions are welcome!

### Steps 
#### 1. Install as dependency
```bash
npm install typescript-dev-loop --save-dev
#  or 
yarn add -D typescript-dev-loop
```

#### 2. Typescript - Create `tsconfig.json` file

```json
{
  "extends": "./node_modules/typescript-dev-loop/config/tsconfig.json",
  "include": [
    "src"
  ],
  "exclude": [
    "dist",
    "node_modules",
    "src/**/*.test.ts"
  ]
}
```

#### 3. Lint -Add to `package.json` file

```json
{
  "eslintConfig": {
    "root": true,
    "extends": "./node_modules/typescript-dev-loop/config/eslint.json"
  }
}
```

####  4. Jest - Create `jest.config.js` file

```js
import jest from "typescript-dev-loop/jest";
export default jest;

```

#### 5. Run scripts - add to `package.json` file

```json
{
  "scripts": {
    "build": "tdl-build",
    "prepack": "yarn build",
    "lint": "tdl-lint",
    "test": "tdl-test"
  }
}
```

## License
[The MIT License](./LICENSE) © Marek Pazik

---
_Source: https://npm.io/package/typescript-dev-loop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
