Awesome
Phaser Sublime Text Packages
This is a set of Sublime Text packages to help developers to code HTML5 2D games based on PhaserJS.
Smart coding
We use a modified version of tern_for_sublime to get JavaScript smart coding, in addition to a generated Phaser plugin using the Phaser Editor tooling.
This is a list of what you get:
- Phaser API auto-completion
- Jump to definitions
- Jump back
- Select all references (useful for renames)
- Describe (tested on Sublime Text 3)
For more details checkout tern_for_sublime.
WARNING: for a good code completion you should follow certain coding style, to help the type inference engine, read more about it in this issue.
Installation
- Install nodejs
- Open Sublime Text
- Open the Packages folder: go to
Main menu > Preferences > Browse Packages...
- It opens the OS explorer in the package folder.
- In that folder copy the content of the packages directory of this repo.
- Restart Subilme Text
- Open the phaser demo project and test it coding on the
game.js
file. - Warning: there is an issue if you add
phaser.js
to your project. Please, rename it tophaser.min.js
until we fix it.
The demo project has nothing in special just that you should put in the root a Tern project file (.tern-project
) and add there the Phaser plugin.
To enable automatic completions read here.
Thanks
Special thanks to Angelo Zerr for his very kind support on everything related to ternjs.
Found a problem?
Create an issue here!
Alternatives
Phaser Editor a complete IDE for Phaser games development.
Screenshots
Phaser API auto-completions:
Tern commands:
Basic .tern-project
file: