Webstorm 6 - modernizr

Just installed webstorm 6, i LOVE the new dracula theme.. so much better now, I used to customize webstorm to look like this, now it's perfect, thanks :)

My problem is that I want webstorm to autocomplete/suggest from Modernizr script while I write my code, but it doesn't do it.

What I mean is that I started to write:
if (Mo
and I want webstorm to suggest me to complete my line so I can achieve this:
if (Modernizr.csstransitons)

I have modernizr script in my project... so what am I missing?

Thank you.

Comment actions Permalink

Hello Tal,
You could place TypeScript stub from https://github.com/borisyankov/DefinitelyTyped/blob/master/modernizr/modernizr.d.ts anywhere into your project to help competion engine work better.


Comment actions Permalink

How do I do that.. I never done something like this, and I don't really knw what typescript is...
I did a search for placing typescript stub, but couldn't found anything relavant.
Thanks for the quick reply.

Comment actions Permalink

You don't have to use TypeScript, just put this file anywhere to your project (e.g. in folder 'externs'). IDE will know about modernizr structure and will suggest relevant modernizr completion items. I.e. this stub file is only for IDE.

Comment actions Permalink

Got it!
Thank you very much...


Please sign in to leave a comment.