# stryker-babel-transpiler

> A plugin for babel projects using Stryker

Latest version **0.10.1** (published 2019-02-12) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install stryker-babel-transpiler
pnpm add stryker-babel-transpiler
yarn add stryker-babel-transpiler
bun add stryker-babel-transpiler
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.10.1 |
| Published | 2019-02-12 |
| First published | 2017-12-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 3 |
| Unpacked size | 37.5 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3173 |
| Author | Sander Koenders |
| Maintainers | strykermutator-npa |
| Keywords | stryker, stryker-plugin, javascript, stryker-transpiler, babel |

## Links

- npm: https://www.npmjs.com/package/stryker-babel-transpiler
- Repository: https://github.com/stryker-mutator/stryker
- Homepage: https://github.com/stryker-mutator/stryker/tree/master/packages/stryker-babel-transpiler#readme
- Issues: https://github.com/stryker-mutator/stryker/issues
- npm.io page: https://npm.io/package/stryker-babel-transpiler

## Dependencies (3)

- [minimatch](https://npm.io/package/minimatch.md) ~3.0.4
- [stryker-api](https://npm.io/package/stryker-api.md) ^0.24.1
- [@stryker-mutator/util](https://npm.io/package/@stryker-mutator/util.md) ^0.1.0

## Recent versions

- 0.10.1 (latest) — 2019-02-12
- 0.10.0 — 2019-02-08
- 0.9.0 — 2019-02-08
- 0.8.0 — 2018-12-23
- 0.7.11 — 2018-12-12
- 0.7.10 — 2018-11-29
- 0.7.9 — 2018-11-29
- 0.7.8 — 2018-11-13
- 0.7.7 — 2018-11-07
- 0.7.6 — 2018-10-15
- 0.7.5 — 2018-10-15
- 0.7.4 — 2018-10-03
- 0.7.3 — 2018-09-30
- 0.7.2 — 2018-09-14
- 0.7.1 — 2018-08-21
- … 21 more at https://npm.io/package/stryker-babel-transpiler/versions

## README

[![Build Status](https://travis-ci.org/stryker-mutator/stryker.svg?branch=master)](https://travis-ci.org/stryker-mutator/stryker)
[![NPM](https://img.shields.io/npm/dm/stryker-babel-transpiler.svg)](https://www.npmjs.com/package/stryker-babel-transpiler)
[![Node version](https://img.shields.io/node/v/stryker-babel-transpiler.svg)](https://img.shields.io/node/v/stryker-babel-transpiler.svg)
[![Gitter](https://badges.gitter.im/stryker-mutator/stryker.svg)](https://gitter.im/stryker-mutator/stryker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![BCH compliance](https://bettercodehub.com/edge/badge/stryker-mutator/stryker)](https://bettercodehub.com/)

![Stryker](https://github.com/stryker-mutator/stryker/raw/master/stryker-80x80.png)

# Stryker Babel plugin

A plugin that adds support for [Babel](https://github.com/babel/babel) to [Stryker](https://stryker-mutator.io), the JavaScript Mutation testing framework. 

## Peer dependencies

The `stryker-babel-transpiler` requires you to install babel 7. Install _at least_ the `@babel/core` package (version 7).

## Quickstart

First, install Stryker itself (you can follow the [quickstart on the website](https://stryker-mutator.io/quickstart.html))

Next, install this package:

```bash
npm install --save-dev stryker-babel-transpiler @babel/core
```

Next, open up your `stryker.conf.js` file and add the following properties:

```javascript
babel: {
    // Location of your .babelrc file, set to `null` to
    optionsFile: '.babelrc', 
    // Override options here:
    options: {
        // presets: ['@babel/env'],  
        // plugins: ['transform-es2015-spread']
    },
     // Add extensions here
    extensions: [/*'.ts'*/]
}
transpilers: [
    'babel' // Enable the babel transpiler
],
```

If you initialize stryker using `stryker init`, the babelrcFile property will be added to your `stryker.conf.js` automatically.

Now give it a go: 

```bash
$ npx stryker run
```

## Configuration  

### `babel.optionsFile` [`string | null`] 

Default: `'.babelrc'`

The location of your babelrc file. Set this value to `null` to disable loading of a babel config file.

### `babel.options` [`TranspilerOptions`] 

Default: `{}`

Override babel options from your config file here. Please see [babel's documentation](https://babeljs.io/docs/en/options) to see what is available. 

Some options are restricted to be set, because the stryker-babel-transpiler takes control of it. These options are: `filename`, `filenameRelative` and `cwd`.

### `babel.extensions` [`string[]`]

Default: `[]`

Load additional extensions here. By default only these extensions get picked up by babel: `".js", ".jsx", ".es6", ".es", ".mjs"`.
For example: if you want to enable typescript transpilation, set extensions to `["ts", "tsx"]`.

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