1.0.2 • Published 6 years ago

path-to-import v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

path-to-import

Tool for replacing src="path" by import statement for React components.

path-to-import -h or p2i -h for usage

Example:

p2i --src=./src --ext=js,jsx --prefix=assets

Before:

<img src="images/logo@2x.png" alt="" />

After:

import logo2xPng from 'assets/images/logo@2x.png';
.
.
.
<img src={logo2xPng} alt="" />
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago