@proof-ui/babel-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.3.6 • Public • Published

@proof-ui/babel-plugin

A plugin to enable babel as a test preprocessor, allowing the use of ES6/ESNext features while authoring. The default configuration uses @babel/preset-env

Installation

yarn add -D @proof-ui/babel-plugin

Usage

// proof.config.js
import BabelPlugin from '@proof-ui/babel-plugin';

export default {
  plugins: [
    new BabelPlugin({
      // Optional Configuration
    })
  ]
};

Options

You can configure the babel-plugin through some options in it's constructor:

Property Description Type Default
config A babel configuration object to use when transpiling tests object

Example

To enable typescript support in your tests

import BabelPlugin from '@proof-ui/babel-plugin';

new BabelPlugin({
  config: {
    extensions: ['.js', '.jsx', '.ts', '.tsx'],
    presets: ['@babel/preset-env', '@babel/preset-typescript']
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i @proof-ui/babel-plugin

Weekly Downloads

287

Version

0.3.6

License

MIT

Unpacked Size

51.5 kB

Total Files

10

Last publish

Collaborators

  • tmarmer
  • adierkens
  • tylerkrupicka