Home > Web Front-end > JS Tutorial > Egret Engine Development Guide Release Project_node.js

Egret Engine Development Guide Release Project_node.js

WBOY
Release: 2016-05-16 16:37:44
Original
1507 people have browsed it

In Egret, using the publishing function is also very simple. You just need to use the following command:

egret publish HelloWorld
Copy after login

In this command, egret publish is the publishing command, and HelloWorld is the name of your current project.

After executing this command, egret will start the release packaging work. The release process at this time may take longer than building the function. Because the Egret tool will do the final publishing work of your game code, this work is a very strict compilation process. The process is very complicated. We just need to understand what it does.

Using Egret’s publishing function also requires Java7 to be installed. You should install Java 7 or higher to support your publishing capabilities.

After executing the publishing function, Egret will encrypt and obfuscate your source code, and put all the js code into the game-min.js file, and the content in the file will be obfuscated and compressed. In this way, you can upload the files in the release folder in the project to your server, and visit the corresponding URL to open the game.

The final game access address is the index.html file in the release directory.

You can also create a version number for the packaged file, use the following command:

egret publish HelloWorld --v abc
Copy after login

Use the above command to generate a folder named abc under the release folder, which stores the released code.

--The v parameter specifies the version number of the release. At the same time, the folder name after release will also be generated correspondingly.

Modular compilation

In previous versions of egret, all code in the engine would be compiled into a file after publish, but developers likely would not use all the functions in the engine, which would bring additional network transmission overhead.

In version 1.0.4, we focused on optimizing this issue. Now the egret engine is divided into 5 modules: core/gui/dragonbones/html5/native. Developers only need to configure your modules in the egretProerties.json file to compile the specified modules to reduce the compilation volume.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template