Skip to content
Alexander Gordeyko edited this page Oct 11, 2017 · 1 revision

Sections for build project.

Can have different configurations.

Tag build create commands for haxe compiler.

If hxml attribute true, then prepare or build module create hxml file and set it for haxe compiler.

Tag app have list configurations and them require any module config tags.

Tag uglify join and compress selected js files.

If libcache attribute true, uglify create libcache.js file for fast compilation debug configurations.

Tag wrapper set begin or end text for selected file.

Example:

<build hxml="true">
    <ANY_HAXE_OPTION>VALUE</ANY_HAXE_OPTION>
    <d name="FLAG_NAME">FLAG_VALUE</d>
    <apps>
        <BUILD_NAME>
            <ANY_HAXE_OPTION>VALUE</ANY_HAXE_OPTION>
        </BUILD_NAME>
        <BUILD_NAME>
            <ANY_HAXE_OPTION>VALUE</ANY_HAXE_OPTION>
        </BUILD_NAME>
    </apps>
    <release>
        <ANY_HAXE_OPTION>VALUE</ANY_HAXE_OPTION>
    </release>
    <debug>
        <ANY_HAXE_OPTION>VALUE</ANY_HAXE_OPTION>
    </debug>
</build>

<uglify cache="true">
    <release><c/><m/></release>
    <debug>
        <input>jslib/stacktrace.min.js</input>
        <sourcemap>
            <input>HAXE_OUTPUT_PATH/HAXE_OUTPUT_FILE.js.map</input>
            <output>OUTPUT_PATH/OUTPUT_FILE.js.map</output>
            <url>OUTPUT_FILE.js.map</url>
            <source>OUTPUT_FILE.js</source>
        </sourcemap>
    </debug>
    <input>ANY_JS_LIBRARY</input>
    <input>HAXE_OUTPUT_PATH/HAXE_OUTPUT_FILE.js</input>
    <output>OUTPUT_PATH/OUTPUT_FILE.js</output>
    <apps><!-- See build section --></apps>
</uglify>

<wrapper>
    <file>FILE</file>
    <pre>FILE_CONTENT_PREFIX</pre>
    <post>FILE_COUNTENT_POSTFIX</pre>
</wrapper>

Build commands examples:

pony build
pony build PROJECT_NAME
pony build debug
pony build PROJECT_NAME debug
pony build PROJECT_NAME release
Clone this wiki locally