Open t1gu1 opened 7 years ago
I'm glad you like the tool!
Import-js should work without having watchman installed, although you'll have a much more pleasant experience when it is available. Here are installation instructions: https://facebook.github.io/watchman/docs/install.html (it needs to be installed globally).
If you for some reason can't use watchman (or if the issue remains after watchman installation), I need a little more input from you:
Hi, thanks for the response.
I just have an error like this one on the fix all imports function : SyntaxError: Unexpected token (30:12)
The line(30:12):
new SubscribeRoute (app);
It should import this:
import {SubscribeRoute} from './routes/subscribe';
When i use the function import word under cursor it works!!
But it import this import { SubscribeRoute } from '../../../dist/server/core/routes/subscribe';
but it should be this:
import {SubscribeRoute} from './routes/subscribe';
I think i know the issue.. i'm working in typescript.ts In fact it's not an issue but an enchancement. It'll be very nice if it works with typescript files!! :O
Seriously, if you can pimp your code/plugin or create an other one for .ts file. You'll create a big missing thing of Atom!
At the moment, import-js doesn't have any support for typescript. To enable it, there are a few things we need to do:
A) Change file watching to find *.ts files as well B) use a typescript parser in order to find exports
A is probably pretty easy. B could be easy as well, but I don't know much about the typescript parser, and how it differs from babylon (that we use currently).
There are the errors i've in Atom:
I'm on Linux: Ubuntu I need this magic plugin works on Atom. I was on phpStorm be Atom is really nice but this plugin is price less.
Thx for your works. I swear to see it fix in a moment. :)