To do this magic we should go back to when we setup the Cocos2d-x first.
1. When you run the python "setup.py" script it ask you to set the ANT_ROOT global variable value .as Shown here:
Once done , we are ready to minify our project , if you follow my tutorial :
2. So now it is the time to copy back the files to the cocos2d-x directory structure , in my pc it is under : cocos2d-x-3.8.1\cocos2d-x-3.8.1\Projects\SnakeJS
3. Open command line window in our SnakeJS root and type the following command :
cocos compile -p web -m release
4. The Final game should be in this directory :Projects\SnakeJS\publish\html5
5. That's it ! you can run the game in your server using the good old index.html entry point .
We are ready to build our "SnakeJS" game for Windows desktop the next tutorial :
Play the final SnakeJS game :
The SnakeJS source code: