0.0.1 • Published 5 years ago

absolute-path.macro v0.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

absolute-path.macro npm Version Build Status

A Babel macro to convert relative paths to absolute paths

Usage

First, configure babel-plugin-macros.

Then, use absolute-path.macro as follows:

const {absolutePath} = require('absolute-path.macro')

console.log(absolutePath`foo`)

The above code will compile into:

console.log(`/path/to/foo`)

(Where /path/to/foo is the absolute path to foo.)

Installation

$ yarn add --dev absolute-path.macro

License

MIT