-
Notifications
You must be signed in to change notification settings - Fork 20
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
require('folder') breaks hinting #32
Comments
@hacker112 doing Is this actual live (deployed) code or just something you found while testing? |
This is node require I am talking about. I see your point, but I think that checking if require is global or a local variable would be sufficient enough, but I am not 100% sure. This is in my project code, so I could also of course change my code instead. I did thought of any collision with requireJS. |
@hacker112 Checking if require is global works well and probably one thing of many things application developers should take in consideration (UMD)... But Ternific is running inside of Brackets, which uses requirejs. So checking if require is in the global will always result in a true check :) The check will probably have to be more on the configuration for ternific that if it has defined node support, than I could enable such assumptions about |
Could you test the relative path using the file system stat method to see if it exists and if it's a file or directory? |
Ternific does not handle require('folder') correctly. Hinting stops working when there is code that uses require('folder') in a javascript filer.
require('folder') is equivalent to require('folder/index.js').
require('folder/index.js') gives hints but not, require('folder').
The text was updated successfully, but these errors were encountered: