<commit_before># TypeScript Simple Loader

**Deprecated: Please use [ts-loader](https://github.com/TypeStrong/ts-loader)**

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

> Feature complete TypeScript loader for webpack. **Works with `typescript@>=1.5`**.

![Webpack Hot Module Replacement with TypeScript](https://github.com/blakeembrey/typescript-simple-loader/raw/master/screenshot.png)

## Installation

```sh
npm install typescript-simple-loader --save

# Make sure your TypeScript-compatible compiler is installed.
npm install typescript --save
```

## Features

* Supports [`tsconfig.json`](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json)
* Supports Source Maps
* Emits *all* TypeScript issues (including external dependencies like `.d.ts` files)
* Emits semantic diagnostics as webpack warnings (doesn't block compilation)
* Watches and reloads every compilation dependency (yes, even `d.ts` files)

## Usage

Add typescript as a resolvable extension and specify this as the loader for those extensions.

```js
module.exports = {
  entry: './main.ts',
  resolve: {
    extensions: ['', '.ts', '.tsx', '.js']
  },
  module: {
    loaders: [
      {
        test: /\.tsx?$/,
        loader: 'typescript-simple-loader'
      }
    ]
  }
}
```

### Load `tsconfig.json`

The loader automatically resolves and parses `tsconfig.json`, based on the Webpack context, using [tsconfig](https://github.com/TypeStrong/tsconfig).

### Configuration Options

You can set options by using the query string.

```js
loaders: [
  {
    test: /\.ts$/,
    loader: 'typescript-simple-loader?compiler=ntypescript&configFile=tsconfig.json&ignoreWarnings[]=2304'
  }
]
```

* **compiler** Set a custom TypeScript compiler compatible with `typescript@>=1.5-alpha`
* **configFile** Manually set the location of the `tsconfig.json` file
* **ignoreWarnings** Set an array of TypeScript diagnostic codes to ignore

## License

MIT

[npm-image]: https://img.shields.io/npm/v/typescript-simple-loader.svg?style=flat
[npm-url]: https://npmjs.org/package/typescript-simple-loader
[downloads-image]: https://img.shields.io/npm/dm/typescript-simple-loader.svg?style=flat
[downloads-url]: https://npmjs.org/package/typescript-simple-loader
[travis-image]: https://img.shields.io/travis/blakeembrey/typescript-simple-loader.svg?style=flat
[travis-url]: https://travis-ci.org/blakeembrey/typescript-simple-loader
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/typescript-simple-loader.svg?style=flat
[coveralls-url]: https://coveralls.io/r/blakeembrey/typescript-simple-loader?branch=master
<commit_msg>Use `.tsx?` in README code example<commit_after># TypeScript Simple Loader

**Deprecated: Please use [ts-loader](https://github.com/TypeStrong/ts-loader)**

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

> Feature complete TypeScript loader for webpack. **Works with `typescript@>=1.5`**.

![Webpack Hot Module Replacement with TypeScript](https://github.com/blakeembrey/typescript-simple-loader/raw/master/screenshot.png)

## Installation

```sh
npm install typescript-simple-loader --save

# Make sure your TypeScript-compatible compiler is installed.
npm install typescript --save
```

## Features

* Supports [`tsconfig.json`](https://github.com/Microsoft/TypeScript/wiki/tsconfig.json)
* Supports Source Maps
* Emits *all* TypeScript issues (including external dependencies like `.d.ts` files)
* Emits semantic diagnostics as webpack warnings (doesn't block compilation)
* Watches and reloads every compilation dependency (yes, even `d.ts` files)

## Usage

Add typescript as a resolvable extension and specify this as the loader for those extensions.

```js
module.exports = {
  entry: './main.ts',
  resolve: {
    extensions: ['', '.ts', '.tsx', '.js']
  },
  module: {
    loaders: [
      {
        test: /\.tsx?$/,
        loader: 'typescript-simple-loader'
      }
    ]
  }
}
```

### Load `tsconfig.json`

The loader automatically resolves and parses `tsconfig.json`, based on the Webpack context, using [tsconfig](https://github.com/TypeStrong/tsconfig).

### Configuration Options

You can set options by using the query string.

```js
loaders: [
  {
    test: /\.tsx?$/,
    loader: 'typescript-simple-loader?compiler=ntypescript&configFile=tsconfig.json&ignoreWarnings[]=2304'
  }
]
```

* **compiler** Set a custom TypeScript compiler compatible with `typescript@>=1.5-alpha`
* **configFile** Manually set the location of the `tsconfig.json` file
* **ignoreWarnings** Set an array of TypeScript diagnostic codes to ignore

## License

MIT

[npm-image]: https://img.shields.io/npm/v/typescript-simple-loader.svg?style=flat
[npm-url]: https://npmjs.org/package/typescript-simple-loader
[downloads-image]: https://img.shields.io/npm/dm/typescript-simple-loader.svg?style=flat
[downloads-url]: https://npmjs.org/package/typescript-simple-loader
[travis-image]: https://img.shields.io/travis/blakeembrey/typescript-simple-loader.svg?style=flat
[travis-url]: https://travis-ci.org/blakeembrey/typescript-simple-loader
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/typescript-simple-loader.svg?style=flat
[coveralls-url]: https://coveralls.io/r/blakeembrey/typescript-simple-loader?branch=master

{'fraction_non_alphanumeric': 0.15318916954388515, 'fraction_numerical': 0.002907504997274214, 'mean_word_length': 4.799789251844047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 24, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2667101', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1771, 'n_words': 391}