mikevaleriano Posted August 15, 2017 Share Posted August 15, 2017 Hi. In v2 (community edition, as far as I've tested) you could, using webpack and the expose-loader plugin, pretty much use Phaser in a bundler environment and get full (except when a physics engine was selected, but it's not a big deal) intellisense/auto-complete in VSCode and in other editors too, I believe. You could code using ES6 and lint the whole thing without issues. It doesn't seem to be the same in v3. Importing (import Phaser from 'phaser';) doesn't seem to return the same result in v3 as it did in v2 - I can't have const game = new Phaser.game(options); - and the phaser3-project-template npm package shows a global import (import 'phaser';), which causes intellisense/linting to fail. Is there a way to have Phaser imported into a const instead of the global space and have it "work" the way it used to in v2? Is it done in a different way? I know things have changed in the core, but I was hoping to keep the same tooling as before, with intellisense and linting working. Thanks, and please forgive the broken English. Link to comment Share on other sites More sharing options...
rich Posted August 15, 2017 Share Posted August 15, 2017 Does VSCode use JSDocs to provide intellisense? If so then are you sure that isn't the reason why the Alpha fails? (because there aren't any JSDocs at all in the alpha, so it has nothing to show in the intellisense?) Machine-dev 1 Link to comment Share on other sites More sharing options...
mikevaleriano Posted August 15, 2017 Author Share Posted August 15, 2017 4 minutes ago, rich said: Does VSCode use JSDocs to provide intellisense? If so then are you sure that isn't the reason why the Alpha fails? (because there aren't any JSDocs at all in the alpha, so it has nothing to show in the intellisense?) I'm not sure it uses JSDocs "behind the scenes", but I do use it explicitly when passing the game object around, because all my code is modular; and that's the reason I get intellisense everywhere. That may very well be the reason it's failing, then. On that note, will JSDocs be available for v3 before a release candidate? I probably shouldn't expect it during alpha, but perhaps on beta? Thanks for taking the time to answer. Link to comment Share on other sites More sharing options...
rich Posted August 15, 2017 Share Posted August 15, 2017 Docs are what I'm currently working on, but we're yet to work out a powerful enough workflow. More R&D time required. They will be in before RC though. Not the August beta, but definitely the one following (in some form at least). Machine-dev and mikevaleriano 2 Link to comment Share on other sites More sharing options...
mikevaleriano Posted August 15, 2017 Author Share Posted August 15, 2017 Alright, thanks! I'll keep on working with v2-ce because tooling is rather important to me, but I'll keep an eye on docs development/release for v3. Link to comment Share on other sites More sharing options...
Recommended Posts