1

我正在尝试缩小构建完成后不包含在整个构建过程中的附加文件。我认为这可以通过从“-after-build”部分调用 sencha cmd 并尝试以下方式从 build.xml 文件中完成:

<target name="-after-build">
    <x-sencha-command dir="${build.dir}">
        fs
            minify
                -f additional-file.js
                -t additional-file.min.js
                -yui
    </x-sencha-command>
</target>

不幸的是,这会导致一个非常通用的错误:

[INF] -after-build:
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException
[ERR]
[ERR] Total time: 18 seconds
[ERR] The following error occurred while executing this line:
...\build.xml:31: com.sencha.exceptions.BasicException

build.xml 的第 31 行是:

<x-sencha-command dir="${build.dir}">

如何才能做到这一点?

谢谢和最好的问候

ps.:我已经在sencha论坛上发布了这个问题,但到目前为止没有得到任何回复:http ://www.sencha.com/forum/showthread.php?272190-Executing-sencha-minify-command-来自-build.xml

4

1 回答 1

1

上述任务调用仅在参数名(-t 和 -f)及其值之间缺少“=”。所以这是有效的:

<x-sencha-command>
    fs
        minify
            -f=${build.dir}/bootstrap-app.js
            -t=${build.dir}/bootstrap-app.js
            ${build.compression}
</x-sencha-command>
于 2013-09-23T10:17:59.837 回答