stringham / move-ts

A Visual Studio Code plugin for updating relative imports when moving typescript files and folders in your workspace.
MIT License
52 stars 15 forks source link

Does not change any paths #7

Closed danielbrodin closed 7 years ago

danielbrodin commented 7 years ago

It doesn't seem to work for me. Using vscode 1.13.1 and macOS Sierra on a project using create-react-app with the typescript script. Have tried moving a couple of files, but none seem to work.

src
  /components
    /Subfolder
    Component1.tsx
    Component2.tsx

Component2 has import Component1 from './Component1', and then I move Component1 to Subfolder/Component1.tsx but nothing happens with the import.

Is there something I have missed?

ablakey commented 7 years ago

I just experienced the same issue. I wonder if it doesn't support .tsx ?

stringham commented 7 years ago

You're right. Right now it's hard coded to only look at .ts files. We should add an option for which files to include.

danielbrodin commented 7 years ago

Any reason for only supporting .ts files? Have a couple of components I want to move and this extension would make it so much easier :)

stringham commented 7 years ago

There is no reason. When I wrote it I only needed it for .ts files so I ended up hard coding it that way.

I just published an update that should support .tsx files, let me know if it doesn't work for you.