JSPM

typescript-plugin-move-file

0.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26838F
  • License MIT

typescript plugin that let the user move files and folders fixing all references (refactor)

Package Exports

  • typescript-plugin-move-file

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (typescript-plugin-move-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TypeScript plugin for moving files or folders

Demos

Moving and renaming a file in Visual studio Code Editor:

  • Moving and renaming a file in Visual studio Code Editor

Editor agnostic!. See the same demo but in Atom editor:

  • Moving and renaming a file in Atom 
Editor

How to use

npm i --save-dev typescript-plugin-move-file

in your tsconfig.json, add the plugin:

{
  "compilerOptions": {
    "plugins": [{
        "name": "typescript-plugin-move-file"
    }]
  }
}

Make sure you have installed typescript in your project (npm i --save-dev typescript) the editor you are using uses that typescript and not another. For example, Visual Studio Code comes with its own typescript version, so you need to "Select TypeScript Version" of the workspace:

{
  "typescript.tsdk": "node_modules/typescript/lib"
}

In Atom editor, if you use atom-typescript package you don't need to do anything since by default it will use the workspace's TypeScript version.

TODO

  • move folder is broken
  • show confirmation in the current sourcefile (large projects take several seconds)
  • notify last error - adding a comment just below the &%&% comment that failed
  • option to undo-last-action