extjssencha-cmd

When using ExtJS Theming System, Why do I need to run sencha app build while Running sencha app watch?


I noticed that updating scss files while sencha app watch is running does not update the output CSS files correctly. I tried changing the parameters on the mixin I am using but the CSS output file's Modified Date in the file system is not updated. Even though I noticed that sencha app watch detects the changes the output is not correct (ie: I don't see the style being reflected in the UI).

I have to manually run sencha app build development just to ensure that the theme is built correctly.

Is this a normal behavior from Sencha CMD or I might have updated some config somewhere?


Solution

  • It is normal. If you change scss files you need to run a build. Otherwise changes are not reflected in css files. Build is not triggered by sencha app watch since it can take tens of seconds, and the point of watch is to reflect changes in your code almost immediately (hot refresh).

    The same goes for adding new classes with Ext.define, although in this case a sencha app refresh command is enough.

    EDIT: according to the documentation, sencha app watch --fashion updates the styles when changed.