我在extjs 6应用程序中遇到需要自定义主题包的问题。我创建了一个自定义主题包,扩展了Triton主题,构建了包并将.pkg添加到本地存储库。然后我将包添加到我应用的app.json文件中的requires块并运行sencha app refresh -packages
。然后我收到以下错误:
rook$ sencha app refresh -packages
Sencha Cmd v6.0.2.14
[INF] Processing Build Descriptor : classic
[INF] Refreshing packages for build : classic
[ERR] Cannot satisfy requirements for "theme-neptune"!
[ERR] The following versions cannot be satisfied:
[ERR] new-test-theme: theme-neptune (No matches!)
[ERR] Cannot resolve package requirements
这是我的自定义主题包的package.json文件:
{
"name": "new-test-theme",
"namespace": "New.test.theme",
"type": "theme",
"extend": "theme-triton",
"toolkit": "classic",
"creator": "pr-repo",
"summary": "Short summary",
"detailedDescription": "Long description of package",
"version": "1.0.1",
"compatVersion": "1.0.0",
"format": "1",
"slicer": {
"js": [
{
"path": "${package.dir}/sass/example/custom.js",
"isWidgetManifest": true
}
]
},
"output": "${package.dir}/build",
"local": true,
"sass" : {
"namespace": "New.test.theme",
"etc": "${package.dir}/sass/etc/all.scss,${package.dir}/${toolkit.name}/sass/etc/all.scss",
"var": "${package.dir}/sass/var,${package.dir}/${toolkit.name}/sass/var",
"src": "${package.dir}/sass/src,${package.dir}/${toolkit.name}/sass/src"
},
"classpath": "${package.dir}/src,${package.dir}/${toolkit.name}/src",
"overrides": "${package.dir}/overrides,${package.dir}/${toolkit.name}/overrides",
"example": {
"path": [
"${package.dir}/examples"
]
},
"framework": "ext",
"requires": [
]
}
然后在我的应用程序app.json文件中,我需要包:
"requires": [
"font-awesome",
"new-test-theme"
],
我正在跑步:
Sencha Cmd v6.0.2.14
和
ext-6.0.1
任何人都可以看到导致此错误的内容吗?
答案 0 :(得分:3)
我认为您需要设置theme
属性,而不是将其添加到requires
属性中。
应该是这样的:
"builds": {
"classic": {
"toolkit": "classic",
"theme": "new-test-theme"
},
"modern": {
"toolkit": "modern",
"theme": "new-test-theme"
}
}