1
votes

I'm using Ext JS and Sencha CMD and want to experiment with a few themes.

Also I have read that the theme for an app can be changed in app.js(using theme property) and sencha.cfg(using app.theme property) and then run sencha app build.

I would like to know, Why are this configurations in two different files? And Which is the correct way of doing this?

2

2 Answers

0
votes

In ExtJS 5, the correct way to specify your application's theme is via the app.json file, as described in the documentation.

The sencha.cfg method also works, but is there to support migration from older versions of ExtJS.

0
votes

Both are corrects ways to define the theme. However, it's better to have the theme defined in app.json. You'll anyway have a theme default defined in sencha.cfg -

app.theme=ext-theme-classic

What you define in app.json as

"theme": "my-theme"

will override what is defined in sencha.cfg

Refer the doc for clarity - http://docs.sencha.com/cmd/5.x/microloader.html