Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top