我使用的是Extjs-6。我使用sencha -sdk D:\xampp\htdocs\Lib\ext-premium-6.0.0\ext-6.0.0 generate app Prj1 D:\xampp\htdocs\ExtProjects\Workspace1\Prj1
创建了一个应用。我使用sencha app build
构建项目,主题结果如下:
但是当我使用sencha app watch
构建项目时,结果如下:
为什么结果不同?
答案 0 :(得分:0)
我发现主题没有任何变化......每两次你最终都会new ExtJS 6 default Triton theme
..
如果你需要更改主题,那么可以通过将“packages / local / my-classic-theme / package.json”中的extend属性从其默认值更改来完成,如下所示:
"extend": "theme-neptune"
到
"extend": "theme-crisp"
答案 1 :(得分:0)
更新:
与sencha app build
和sencha app watch
相关的错误。
您可以在this thread at Sencha's Forum
老答案:
对我而言,似乎sencha app build
不会更新classic.json,因此您必须执行sencha app watch
。
我执行了以下操作:
$ sencha app build development
Sencha Cmd v6.1.2.15
[INF] Using GPL version of Ext JS version 6.0.1.250 from /home/alfonso/git/goraexplorer/src/main/webapp/ext.
[INF] The implications of using GPL version can be found here (http://www.sencha.com/products/extjs/licensing).
[INF] Processing Build Descriptor : classic
[INF] Loading app json manifest...
[INF] Appending content to /home/alfonso/git/goraexplorer/src/main/webapp/bootstrap.js
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/classic.json
[INF] merging 258 input resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer/classic/resources
[INF] merged 0 resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer/classic/resources
[INF] merging 21 input resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer
[INF] merged 0 resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/sass/example/bootstrap.json
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/sass/example/bootstrap.js
[INF] Appending content to /home/alfonso/git/goraexplorer/src/main/webapp/bootstrap.js
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/classic.json
$ cd ..
$ cp -R webapp /tmp/webapp-build
$ sencha app watch
Sencha Cmd v6.1.2.15
[INF] Using GPL version of Ext JS version 6.0.1.250 from /home/alfonso/git/goraexplorer/src/main/webapp/ext.
[INF] The implications of using GPL version can be found here (http://www.sencha.com/products/extjs/licensing).
[INF] Processing Build Descriptor : classic
[INF] Starting server on port : 1841
[INF] Mapping http://localhost:1841/~cmd to /home/alfonso/bin/Sencha/Cmd/6.1.2.15...
[INF] Mapping http://localhost:1841/ to /home/alfonso/git/goraexplorer/src/main/webapp...
[INF] Application available at http://localhost:1841
[INF] Loading app json manifest...
[INF] Appending content to /home/alfonso/git/goraexplorer/src/main/webapp/bootstrap.js
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/classic.json
[INF] merging 258 input resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer/classic/resources
[INF] merged 0 resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer/classic/resources
[INF] merging 21 input resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer
[INF] merged 0 resources into /home/alfonso/git/goraexplorer/src/main/webapp/build/development/GoraExplorer
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/sass/example/bootstrap.json
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/sass/example/bootstrap.js
[INF] Appending content to /home/alfonso/git/goraexplorer/src/main/webapp/bootstrap.js
[INF] Writing content to /home/alfonso/git/goraexplorer/src/main/webapp/classic.json
[INF] Waiting for changes...
^C
$ cd ..
$ cp -R webapp /tmp/webapp-watch
$ diff -q -r /tmp/webapp-build /tmp/webapp-watch
Los archivos webapp-build/classic.json y webapp-watch/classic.json son distintos
(classic.json
已更改)
这是差异。正如您所看到的,sencha app watch
定义了一个“loadOrder”键,很可能是您应用程序的不同之处:
如果显示任何错误加载文件,您可以使用浏览器的开发人员工具(F12)进行检查。
请注意,如果再次执行sencha app build
,classic.json
中的更改将再次被错误地写入。
真正的问题必须是加载器中的某个地方,但我认为我们无法解决它:/