PDA

View Full Version : [FIXED] Command 'sencha app watch <build>' not working



jorgemanrubia
15 Apr 2015, 2:14 PM
From the docs here: http://docs-origin.sencha.com/extjs/6.0/whats_new/6.0.0/developing_for_multiple_screens_and_environments.html

You can specify the build configuration like:



sencha app watch modern
sencha app watch classic


That won't work. It will always use the first build entry defined in app.json

Gary Schlosberg
15 Apr 2015, 2:23 PM
In your 'builds' config, do you have one with a build target name of 'modern'?

jorgemanrubia
15 Apr 2015, 2:26 PM
Yes:



"builds": {
"classic": {
"toolkit": "classic",
"theme": "theme-neptune"
},


"modern": {
"toolkit": "modern",
"theme": "theme-neptune"
}
},


That's how the section looks when generating an universal app from scratch:



sencha -sdk /path/to/ExtSDK generate app MyApp ./MyAppLocation


And it does not work, it always build the first one "classic". If you delete the "classic" entry, then it will use "modern".

dongryphon
15 Apr 2015, 9:10 PM
What version of Sencha Cmd do you have? You'll need 6.0.0.92

jorgemanrubia
16 Apr 2015, 1:52 PM
Hi @dongryphon,

Yes, I am using that one and it's working now, thanks. I think I was confused because I was only seeing the message "Processing Build Descriptor : classic" in the console. I couldn't see "Processing Build Descriptor : modern".

Also, I didn't know that both apps were running in the same url. So if you load the app with a touch device, it will run the modern build. And if you use a desktop one, it will load the classic build. That is working as expected.

I am now curious: is it possible to force a mode in "development"? So, for example, if I am using Chrome without the mobile-mode simulator on, how could I see the "modern" build?

Thanks

jorgemanrubia
16 Apr 2015, 11:48 PM
In general, I think it's ignoring the build name with both "sencha app watch" and "sencha app build" . It always build the app for all the builds included in app.json.For example, I deleted the "/build" folder, and executed sencha app build modern(There is a "modern" build entry in my app.json)It will build both "build" and "classic" and generate all the corresponding assets.

dongryphon
17 Apr 2015, 9:28 PM
Thanks! Yes - I can reproduce that. Opening a ticket...