Webstorm 6 - modernizr

Hello,
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)
or
if(Modernizr.whatever)

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

Thank you.

4 comments

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.

Regards,
Konstantin

0

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.

0

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.

0

Got it!
Thank you very much...

0

Please sign in to leave a comment.