in build-scripts/generateResources.ts [137:188]
function createResjson(task: any, taskPath: string): void {
const resources: any = {}
if (Object.hasOwnProperty.call(task, 'friendlyName')) {
resources['loc.friendlyName'] = task.friendlyName
}
if (Object.hasOwnProperty.call(task, 'helpMarkDown')) {
resources['loc.helpMarkDown'] = task.helpMarkDown
}
if (Object.hasOwnProperty.call(task, 'description')) {
resources['loc.description'] = task.description
}
if (Object.hasOwnProperty.call(task, 'instanceNameFormat')) {
resources['loc.instanceNameFormat'] = task.instanceNameFormat
}
if (Object.hasOwnProperty.call(task, 'releaseNotes')) {
resources['loc.releaseNotes'] = task.releaseNotes
}
if (Object.hasOwnProperty.call(task, 'groups')) {
task.groups.forEach(function(group: any) {
if (Object.hasOwnProperty.call(group, 'name')) {
resources[`loc.group.displayName.${group.name}`] = group.displayName
}
})
}
if (Object.hasOwnProperty.call(task, 'inputs')) {
task.inputs.forEach(function(input: any) {
if (Object.hasOwnProperty.call(input, 'name')) {
resources[`loc.input.label.${input.name}`] = input.label
if (Object.hasOwnProperty.call(input, 'helpMarkDown') && input.helpMarkDown) {
resources[`loc.input.help.${input.name}`] = input.helpMarkDown
}
}
})
}
if (Object.hasOwnProperty.call(task, 'messages')) {
Object.keys(task.messages).forEach(function(key) {
resources[`loc.messages.${key}`] = task.messages[key]
})
}
const resjsonPath = path.join(buildTasks, taskPath, 'Strings', 'resources.resjson', 'en-US', 'resources.resjson')
fs.mkdirpSync(path.dirname(resjsonPath))
fs.writeFileSync(resjsonPath, JSON.stringify(resources, undefined, 2))
}