JavaScript Libraries - CDN?

I have PhpStorm for 10 years and I still fight with this aspect over and over again. How do I tell the project that I am using the jQuery library if I am using a CDN and don't want to download it to the project?

 

0
10 comments

In Settings | Languages & Frameworks | JavaScript | Libraries, press Download..., choose `jquery` from the list.

Library won't be downloaded into your project folder, it will be stored in IDE configuration folder, `javascript\extLibs\global-types`

0

Well, for one thing, that does not allow me to specify the version of the library. I did end up using that, but at the time I submitted this post, I could not make that work (could not find NPM or Node). I ended up having to make it use Yarn (I'm on Windows, FYI). Plus this threw me off:

 

https://www.jetbrains.com/help/phpstorm/configuring-javascript-libraries.html

 

0

> Plus this threw me off:

and what's wrong with it? Doesn't it work?

0

No, and based on your comments, I assume that it was old documentation. If not, then it just does not work (I don't get any intentions for these links).

0

Documentation is up-to-date, and the intention works fine for me:

 

what do your CDN links look like?

0

Should work, unless you already have `javascript\extLibs\http_code.jquery.com_jquery-3.4.0.js` in your config dir.

But typings work better anyway, as they provide explicit types info that is missing in .js

0

Is There is no locally stored library for the HTTP link inspection enabled Settings | Editor | Inspections | JavaScript | General?

0

Ah, yea, that was the reason, thanks. 

0

Please sign in to leave a comment.