# @pigs/plugin-typescript

> Official TypeScript plugin for Pigs.

Latest version **12.0.1** (published 2019-03-01) · 0 weekly downloads

## Install

```sh
npm install @pigs/plugin-typescript
pnpm add @pigs/plugin-typescript
yarn add @pigs/plugin-typescript
bun add @pigs/plugin-typescript
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 12.0.1 |
| Published | 2019-03-01 |
| First published | 2019-03-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | linaijiao |

## Links

- npm: https://www.npmjs.com/package/@pigs/plugin-typescript
- npm.io page: https://npm.io/package/@pigs/plugin-typescript

## Dependencies (4)

- [ts-pnp](https://npm.io/package/ts-pnp.md) ^1.0.0
- [tslint](https://npm.io/package/tslint.md) ^5.11.0
- [ts-loader](https://npm.io/package/ts-loader.md) ^5.3.0
- [fork-ts-checker-webpack-plugin](https://npm.io/package/fork-ts-checker-webpack-plugin.md) ^0.5.0

## Recent versions

- 12.0.1 (latest) — 2019-03-01

## README

# @pigs/plugin-typescript

Official TypeScript plugin for Pigs.

## Introduction

This plugin use `ts-loader` to transpile TypeScript files, it also uses `fork-ts-checker-webpack-plugin` to perform type-checking. `.ts` `.tsx` and `.vue` files are supported.

## Install

```bash
yarn add @pigs/plugin-typescript typescript --dev
```

## How to use

```js
module.exports = {
  plugins: [
    {
      resolve: '@pigs/plugin-typescript',
      options: {}
    }
  ]
}
```

Then add a `tsconfig.json` in your project:

```json
{
  "compilerOptions": {
    "target": "es5",
    "strict": true,
    "module": "es2015",
    "moduleResolution": "node"
  }
}
```

## Options

### lintOnSave

- Type: `boolean`
- Default: `true`

Lint TS files with `ts-lint` at compile time, you need to create a `tslint.json` in your project.

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