GitXplorerGitXplorer
H

dedent.macro

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
e7fcfdfccd62a3ccf493ae507db82ab4173ef6d0

0.1.0

HHaroenv committed 6 years ago
Unverified
f64fd576989588f0e58e674a36b852a2f3048f83

chore: default version

HHaroenv committed 6 years ago
Unverified
1fed6b832ff9baa55a9db82d489a9bd1082d7bc8

docs: clearer readme

HHaroenv committed 6 years ago
Unverified
2b18a1fbd953233e24705f19f6fe7b2265043847

initial commit

HHaroenv committed 6 years ago

README

The README file for this repository.

dedent.macro

A babel macro for dedent

Usage

Setting up babel macros

yarn add babel-plugin-macros

.babelrc

{
  "plugins": ["macros"]
}

See more info in the main documentation

Setting up dedent.macro

yarn add --dev dedent.macro
import dedent from 'dedent.macro'

    dedent`
    hi there
    this is fine
    `

This will transform out the leading spaces, just like regular Dedent usage would, but with the difference being that the dedent call will be transformed out completely during the babel process.