Jump to content

Webstorm how to configure external javascript library


pat
 Share

Recommended Posts

hello all,

 

I am trying to use webstorm with Phaser.

 

With the example 'Hello Phaser', it works with no problem

post-4833-0-99595600-1393891108_thumb.pn

The Phaser library is located in the directory build and it works well.

 

Now I want to use Phaser as an external library.

So I delete the directory 'build' and this line in index.html

<script src="buid/phaser.js"></script>

Then in the Preferences panel, I select JavaScript Libraries and 'Add'

post-4833-0-06016300-1393891108.png

 

Then I select the phaser.js library

post-4833-0-35660400-1393891107.png

 

You can see in the top left window that the 'Externals Libraries' contains the phaser.js library.

But it does not works, you can see the error message in the console window.

 

Can you help me to find my error ??

Thanks a lot

post-4833-0-14878800-1393891106_thumb.pn

Link to comment
Share on other sites

That tells Webstorm about the js file, but you still need to tell the browser... you need to keep the script tag in the html.

AFAIK, when you do this in Webstorm, it aids in things like code completion and highlighting in the IDE, it doesn't automatically make it load in your browser. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...