문제

It is slightly touched in the docs The if directive, but not described how you can pass custom parameters to the if directive at the time of making a build. I want to know how can I make several different builds using Sencha Cmd just passing a certain argument/parameter to a build script.

도움이 되었습니까?

해결책

I found the option when I can do that. Suppose we have some conditional parts in the code wrapped into if directive:

...
//<if myoption1>
some code here
//</if>
...
//<if myoption2>
some code here
//</if>
...

Then I figured out the way how I can control myoption parameters at the build state using Sencha Cmd, reading from help for sencha ant command sencha help ant and analyzing different build xml files used by sencha cmd during build process. And here it is:

sencha ant -t "Build - Testing" -p build.options=myoption1:true,myoption2:false,etc

Available targets can be found just typing sencha ant in project folder. So, prepare some shell scripts with different set of custom parameters will give you flexible builds, to a certain extent of course.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top