Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

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.

About

Babel-macro for dedenting template strings

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages