当使用ExtJS主题系统时,在运行sencha app watch时为什么需要运行sencha app build?

huangapple go评论61阅读模式
英文:

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

问题

我注意到在运行sencha app watch时更新scss文件不会正确更新输出的CSS文件。我尝试更改我正在使用的mixin上的参数,但文件系统中的CSS输出文件的修改日期未更新。尽管我注意到sencha app watch检测到了更改,但输出不正确(即:我看不到样式在用户界面中反映出来)。

我不得不手动运行sencha app build development,以确保主题正确构建。

这是否是Sencha CMD的正常行为,还是我可能在某个地方更新了一些配置?

英文:

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?

答案1

得分: 2

这是正常的。如果你修改了 scss 文件,你需要运行构建操作。否则,更改不会反映在 css 文件中。由于 sencha app watch 可能需要数十秒,构建不会被触发,而 watch 的目的是几乎立即反映在你的代码中的更改(热刷新)。

对于使用 Ext.define 添加新类的情况也是如此,尽管在这种情况下,只需运行 sencha app refresh 命令就足够了。

编辑:根据文档sencha app watch --fashion 在更改时更新样式。

英文:

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.

huangapple
  • 本文由 发表于 2023年3月4日 03:07:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/75630978.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定