从build.xml执行sencha minify命令

时间:2013-09-21 09:49:49

标签: build build-process sencha-cmd

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

<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}">

如何做到这一点?

谢谢&amp;最好的问候

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

1 个答案:

答案 0 :(得分:1)

上述任务调用仅在参数名称(-t&amp; -f)与其值之间缺少“=”。这是有效的:

<x-sencha-command>
    fs
        minify
            -f=${build.dir}/bootstrap-app.js
            -t=${build.dir}/bootstrap-app.js
            ${build.compression}
</x-sencha-command>
相关问题