组件-preload.js 未创建
Component-preload.js not beeing created
我正在尝试为 SAPUi5 应用程序生成一个组件-preload.js 文件。我正在使用 grunt-openui5 插件。
如果我将选项的压缩参数设置为 false,我可以生成组件-preload.js。如果我将参数设置为 true,则会生成 noch Component-prelaod.js 文件。
可能是什么原因?我希望 Component-preload.js 被缩小。
这是我正在使用的 Gruntfile.js 的片段。
openui5_preload: {
webapp: {
options: {
resources: {
cwd: '<%= webapp.srcRoot %>', // this should point to the entry folder
prefix: '<%= webapp.prefix %>', // this should be your component namespace
src: [
"!Component-preload.js",
"**/*.js",
"**/*.xml",
"*/*.js",
"*/*.xml",
"*.js",
"*.xml",
"**/*.properties",
"model/*.json",
"*.json",
"*.js",
"**/*.css",
"!Gruntfile.js"
],
},
// "dest" needs to be defined within "options" not "options.resources"
dest: "<%= webapp.targetRoot %>", // to put the file in the same folder
compress: true
},
components: true
}
},
我发现了问题。
我的路径中有一些损坏的 JavaScript 文件,这会阻止压缩任务创建文件。
不幸的是,版本 0.7.0 中的 grunt-openui5 插件没有显示任何错误消息。我使用了插件的 0.11.0 版本,然后我发现了导致问题的文件。
我正在尝试为 SAPUi5 应用程序生成一个组件-preload.js 文件。我正在使用 grunt-openui5 插件。
如果我将选项的压缩参数设置为 false,我可以生成组件-preload.js。如果我将参数设置为 true,则会生成 noch Component-prelaod.js 文件。 可能是什么原因?我希望 Component-preload.js 被缩小。 这是我正在使用的 Gruntfile.js 的片段。
openui5_preload: {
webapp: {
options: {
resources: {
cwd: '<%= webapp.srcRoot %>', // this should point to the entry folder
prefix: '<%= webapp.prefix %>', // this should be your component namespace
src: [
"!Component-preload.js",
"**/*.js",
"**/*.xml",
"*/*.js",
"*/*.xml",
"*.js",
"*.xml",
"**/*.properties",
"model/*.json",
"*.json",
"*.js",
"**/*.css",
"!Gruntfile.js"
],
},
// "dest" needs to be defined within "options" not "options.resources"
dest: "<%= webapp.targetRoot %>", // to put the file in the same folder
compress: true
},
components: true
}
},
我发现了问题。
我的路径中有一些损坏的 JavaScript 文件,这会阻止压缩任务创建文件。 不幸的是,版本 0.7.0 中的 grunt-openui5 插件没有显示任何错误消息。我使用了插件的 0.11.0 版本,然后我发现了导致问题的文件。