@patternplate/babel-preset

3.2.5 • Public • Published

Documentation and development interface for component libraries

@patternplate/babel-preset

  • Framework independent
  • Bring design docs to live with real components
  • Powerful search and meta data system

This is the contributor documentation for @patternplate/babel-preset For user docs see patternplate.github.io

About @patternplate/babel-preset

@patternplate/babel-preset is the shared babel configuration in use across the patternplate mono repoository. It abstracts away the complexities of babel compilation for universal, web and server targets.

Quick start

git clone https://github.com/patternplate/patternplate.git
cd patternplate/packages/babel-preset
yarn
yarn start

Usage

{
  "file": "package.json",
  "babel": {
    "presets": [
      "module:@patternplate/babel-preset"
    ]
  }
}

with options

{
  "file": "package.json",
  "babel": {
    "presets": [
      ["module:@patternplate/babel-preset", {
        "targets": ["node"]
      }]
    ]
  }
}

Options

  • targets ("node" | "web")[]? list of transpilation targets. Defaults to ["node"]. Default is disabled when specified.

    • node: Enable transpilation for Node.js 6
    • web: Enable transpilation for browser matrix
  • sources ("react" | "styled-components")[]? list of source types. Defaults to ["node"]. Default is disabled when specified.

    • react: Transform JSX
    • styled-components: Enable styled-components specific transpiler steps

License

Copyright by SinnerSchrader. All @patternplate packages are released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @patternplate/babel-preset

Weekly Downloads

0

Version

3.2.5

License

MIT

Unpacked Size

5.27 kB

Total Files

4

Last publish

Collaborators

  • kotzendekrabbe
  • lkuechler
  • rongae
  • marionebl