cristian-gabbanini / es2015-template-literals-reducer

Babel plugin to remove unwanted empty spaces from template literals assigments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

es2015-template-literals-reducer

This plugin is a transform to remove unwantend empty spaces from ES2015 template literals.

Example

Converts

const literal = `
  first-item
    second-item
             third-item
`;

To

const literal = `first-item second-item third-item`

Usage

Via .babelrc (Recommended)
{
  "plugins": ["es2015-template-literals-reducer"]
}
Via CLI
$ babel --plugins es2015-template-literals-reducer script.js

About

Babel plugin to remove unwanted empty spaces from template literals assigments


Languages

Language:JavaScript 100.0%