convert-root-import
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "convert-root-import", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Convert paths used in babel-plugin-root-import to relative ones", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,15 @@ # `convert-root-import` | ||
## Usage | ||
``` | ||
convert-root-import -o some-file.js` | ||
``` | ||
See `convert-root-import --help` for more information. | ||
As this tool currently works on single files at a time, you would drive it using `find` or similar if you want to change hundreds of files: | ||
``` | ||
# change JSX files | ||
find src/client -name '*.jsx' -exec convert-root-import -o {} \;` | ||
``` | ||
## Caveats | ||
@@ -20,1 +33,10 @@ This is a simple tool that doesn't build an AST, and only works line-wise. As such, it does not handle multi-line | ||
``` | ||
## Contribute? | ||
PRs are welcome :-) This tool was hacked together in a few hours, and does the job in the 95% case for me. | ||
Possible improvements: | ||
- handle multi-line imports | ||
- traversing directories and multi-file handling (would make `find` superflous) | ||
- building ASTs to handle complex cases? | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5390
41