-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support updating references in JS files #15
Comments
Are you using es6 style import/export in your |
@stringham Yes we are. |
It would be possible to make this work, but I don't know how to tell the difference between a generated Js file and one that is part of the sources we care about. A lot of projects put the compiled js files next to their ts sources. To make it work, changing the following might do it:
I don't have a project to test this on though, but if we tried this, it definitely won't affect users who don't care about |
Couldn't we check if the file is in the dependency graph of the current TS project? I.e. by tracing the graph from the |
@stringham @OliverJAsh I just tried @stringham 's suggestion above and it does indeed work for JS-only projects. I'm not sure about mixed js-ts projects. Maybe @OliverJAsh's suggestion would work:
@stringham I definitely think adding a "Move JS" command would be super useful. In the meantime I'm going to publish a fork of this repo that allows for JS to be moved. |
@tnrich I'm happy to accept a pull request for this feature. |
@stringham I just published my fork which should do the trick for me. https://marketplace.visualstudio.com/items?itemName=tnrich.move-ts-js I'm afraid that making a whole new command might be a bit too much work for me atm. |
VS Code now has this functionality out of the box, so isn't this package now redundant? |
@OliverJAsh I haven't found that it works very well.. Maybe I'm mistaken but don't all the files in question have to be open for the path updates to take place? |
I have a TS project that uses the
allowJs
andcheckJs
compiler options.Currently, if I use this extension to move a TS file/folder, none of the references from JS files are updated.
Is this due to
move-ts/src/index/referenceindexer.ts
Line 32 in b073976
Would this be easy to add support for?
The text was updated successfully, but these errors were encountered: