Yora Posted September 13, 2013 Share Posted September 13, 2013 I'm having trouble getting intellisense to work with the JS version of Phaser, and before I beat my head against the wall with something I'm not knowledgeable about I thought I would ask about it. I'm wondering if its something that's just not integrated at the moment or if I have some other personal trouble. This is what happens when I try to make use of it: I also can't even seem to figure out how I could make a simple JS project in VS as there doesn't seem to be just a 'javascript' template, so what I'm doing here is is creating a typescript project and just using javascript in it. While I was working with typescript in 1.00TS083 intellisense worked fine. I'm pretty clueless when it comes to setting up these kinds of things with my lack of familiarity, but once it's up and running I can code away like a madman. Link to comment Share on other sites More sharing options...
rich Posted September 13, 2013 Share Posted September 13, 2013 Yeah what you'll need to do is wait for me to release the TypeScript definitions file. Once you've got that you just reference it at the top of your TypeScript files and Intellisense will work again. Link to comment Share on other sites More sharing options...
Yora Posted September 13, 2013 Author Share Posted September 13, 2013 Alright cool, exactly what I needed to hear. thanks! Link to comment Share on other sites More sharing options...
korpuskel Posted September 13, 2013 Share Posted September 13, 2013 I can really recommend trying out VS2013 RC (http://www.microsoft.com/visualstudio/eng/2013-downloads). They improved the javascript parsing so Intellisense is much smarter now. I even get parameter information, which I did not get using Sublime Text 3 + Tern: I like the new Intellisense so much that I won't use Typescript when I Phaser 1.0 is released EDIT: the yuidoc is not understood by intellisense because it only parses the ugly XML style documentation used by the .NET languages :/ Link to comment Share on other sites More sharing options...
JHardin1112 Posted September 18, 2013 Share Posted September 18, 2013 Yeah what you'll need to do is wait for me to release the TypeScript definitions file. Once you've got that you just reference it at the top of your TypeScript files and Intellisense will work again. When will this probably be implemented? I use VS 2012 and would really like to use the environment with Intellisense to code a game Link to comment Share on other sites More sharing options...
rich Posted September 18, 2013 Share Posted September 18, 2013 We've got to finish doing the docs first which are a few weeks away yet, then we can parse them for the definitions file. Link to comment Share on other sites More sharing options...
Kobalt13 Posted September 18, 2013 Share Posted September 18, 2013 Korpuskel, how are you getting that to show up? I have VS 2013 RC (express for web) and I am getting the same message about Intellisense as Yora. Link to comment Share on other sites More sharing options...
Yora Posted September 19, 2013 Author Share Posted September 19, 2013 Korpuskel, how are you getting that to show up? I have VS 2013 RC (express for web) and I am getting the same message about Intellisense as Yora.I was wondering this too actually, I upgraded to 2013 RC after I saw his post but it's still the same for me as well. Link to comment Share on other sites More sharing options...
korpuskel Posted September 19, 2013 Share Posted September 19, 2013 You need to include a special reference at the top of each javascript file you want to use intellisense in:/// <reference path="~/path/to/Phaser.js" />If that does not work for you I can also write a step by step guide and provide a sample solution file Zaidar 1 Link to comment Share on other sites More sharing options...
rich Posted September 19, 2013 Share Posted September 19, 2013 I've got an even dumber question for you - what Project type are you using?! The only JavaScript one on the list is Windows Store / Only Available for Windows 8,1. Did you use a TypeScript project and then just add JS files to it? Link to comment Share on other sites More sharing options...
korpuskel Posted September 19, 2013 Share Posted September 19, 2013 I've got an even dumber question for you - what Project type are you using?! The only JavaScript one on the list is Windows Store / Only Available for Windows 8,1. Did you use a TypeScript project and then just add JS files to it? Totally valid question! I really don't like the fact that all project types have to output some kind of binary (*.dll, *.exe) in the bin/Debug or bin/Release folders. I went as far as calling at DOS batch script to remove those directories in the "post build event", but that's quite a hack... So currently I suggest not using any project at all. Just create a new solution with a dummy project of any type. Then in the solution explorer simply remove it (remember to also delete it from the file system). Then add new solution folders to hold the javascript files, like so: I just want to use VS as editor and use grunt to combine / minify the javascript files. Also I don't want to use the IIS which is why I don't use the Web- projects; I'd rather prefer a simple node-express. Take everything I say with a grain of salt since I have not yet done a real project with this setup... still lacking the time to do so Link to comment Share on other sites More sharing options...
rich Posted September 19, 2013 Share Posted September 19, 2013 Wow! The autocomplete is stunning starrynight 1 Link to comment Share on other sites More sharing options...
korpuskel Posted September 19, 2013 Share Posted September 19, 2013 nice, glad you like it How did you get intellisense to work with the javadoc / yuidoc comment style in the first screenshot? Link to comment Share on other sites More sharing options...
rich Posted September 19, 2013 Share Posted September 19, 2013 Hmm rats, it's not so smart once you start using 1 JS file per 'class' Link to comment Share on other sites More sharing options...
Zaidar Posted December 11, 2013 Share Posted December 11, 2013 Hi thank you very much I just download VS2013 just in order to have the autocompletion, and it works very well so far. Sorry to up the old topic, but just to answer to korpuskel (and other people, we never know) if you want the autocompletion with the explication of the parameters (as the first screenshot of rich), you must include the non minified version of phaser.js This seems obvious, but it's the little thing which can waste time. Thanks for the tips guys, cheers. starrynight 1 Link to comment Share on other sites More sharing options...
angelts Posted February 26, 2014 Share Posted February 26, 2014 Part of Intellisense work good and in VS2010 without use of phaser.d.ts. Use for VS template – HTML Project Template.But some methods are not showing no meter what to do. If someone know why lets help. Link to comment Share on other sites More sharing options...
Recommended Posts