我有一个具有以下结构的ExtJS包:
PackageA/
classic/
resrouces/
file.json
classic_resource.json
resources/
file.json
resource.json
当我在需要包A的生产模式下构建应用程序时,在构建目录中,我看到以下内容:
./build/production/MyApp/classic/resources/PackageA/file.json
./build/production/MyApp/classic/resources/PackageA/classic_resource.json
./build/production/MyApp/classic/resources/PackageA/resource.json
似乎共享包资源和特定于工具包(经典)都已复制到同一目录(./MyApp/classic/resources/PackageA/),如果已经存在相同文件,它将被覆盖(文件.json)。
但是,在我的情况下,classic / resources / file.json和resources / file.json具有不同的内容,我需要将它们都保留在构建中。
我该如何实现?
[编辑]
app.json
"output": {
"base": "${workspace.build.dir}/${build.environment}/${app.name}",
"page": "index.html",
"manifest": "${build.id}.json",
"js": "${build.id}/app.js",
"appCache": {
"enable": false
},
"resources": {
"path": "${build.id}/resources",
"shared": "resources"
},
"framework": {
"path": "${build.id}/framework.js",
"enable": true
}
},
"resources": [
{
"path": "resources",
"output": "shared"
},
{
"path": "${toolkit.name}/resources"
},
{
"path": "${build.id}/resources"
}
],
package.json
"output": "${package.dir}/build",
"resource": {
"paths": [
"${package.dir}/resources",
"${package.dir}/${toolkit.name}/resources"
]
},
这是因为您在工具箱的目录中创建了resources
目录,该目录不应该存在。
新生成的程序包中的Readme.md
此经典特定目录可以包括以下任何(如果不是全部)目录:
overrides:此目录中的任何类都将自动需要并包含在经典版本中。如果这些类中的任何一个定义了Ext JS覆盖(将Ext.define与“ override”属性一起使用),实际上,只有指定了目标类,该覆盖才会包含在构建中在“ override”属性中也包括在内。
sass:任何特定于经典的样式规则都应驻留在此包中,并遵循相同的结构作为包根目录中的目录(有关更多信息,请参见package.json)。
src:此软件包的经典特定类应位于此目录中。
如果需要工具箱分隔的资源,请在程序包的根resources
目录中进行。