ericsong / es6mv

CLI util for moving es6 javascript files while renaming relative filepath module imports

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

es6mv

CLI tool for moving es6 javascript files in a project
Edits module imports to work properly in moved location

What does it do?

  • Edits module imports in all affected files so that they refer to the new location
  • Follows the same behavior as mv for moving files (mainly arguments)

How to use

  • Set environment variable ES6MV_INSPECT_DIR to the project directory to listen to
    example... export ES6MV_INSPECT_DIR='/home/user/es6project/'
  • Run command python es6mv.py {YOUR_SOURCE_FILE} {YOUR_DESTINATION_FILE}
  • (Optional) Set an alias alias es6mv='python es6mv.py'
    Run command es6mv.py {YOUR_SOURCE_FILE} {YOUR_DESTINATION_FILE}

Misc

  • Tested on Linux and Mac OS
  • Untested on Windows

About

CLI util for moving es6 javascript files while renaming relative filepath module imports


Languages

Language:Python 88.6%Language:Shell 11.4%