Make sure to always write with normalized line endings
parent
4823e0e2da
commit
f21c227349
|
@ -410,7 +410,9 @@ function generateDeclarationFile(recipe, sourceFileGetter) {
|
|||
let resultTxt = result.join(endl);
|
||||
resultTxt = resultTxt.replace(/\bURI\b/g, 'Uri');
|
||||
resultTxt = resultTxt.replace(/\bEvent</g, 'IEvent<');
|
||||
resultTxt = resultTxt.split(/\r\n|\n|\r/).join(endl);
|
||||
resultTxt = format(resultTxt, endl);
|
||||
resultTxt = resultTxt.split(/\r\n|\n|\r/).join(endl);
|
||||
let resultEnums = [
|
||||
'/*---------------------------------------------------------------------------------------------',
|
||||
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
|
@ -422,6 +424,7 @@ function generateDeclarationFile(recipe, sourceFileGetter) {
|
|||
].concat(enums).join(endl);
|
||||
resultEnums = resultEnums.split(/\r\n|\n|\r/).join(endl);
|
||||
resultEnums = format(resultEnums, endl);
|
||||
resultEnums = resultEnums.split(/\r\n|\n|\r/).join(endl);
|
||||
return {
|
||||
result: resultTxt,
|
||||
usageContent: `${usageImports.join('\n')}\n\n${usage.join('\n')}`,
|
||||
|
|
|
@ -486,7 +486,9 @@ function generateDeclarationFile(recipe: string, sourceFileGetter: SourceFileGet
|
|||
let resultTxt = result.join(endl);
|
||||
resultTxt = resultTxt.replace(/\bURI\b/g, 'Uri');
|
||||
resultTxt = resultTxt.replace(/\bEvent</g, 'IEvent<');
|
||||
resultTxt = resultTxt.split(/\r\n|\n|\r/).join(endl);
|
||||
resultTxt = format(resultTxt, endl);
|
||||
resultTxt = resultTxt.split(/\r\n|\n|\r/).join(endl);
|
||||
|
||||
let resultEnums = [
|
||||
'/*---------------------------------------------------------------------------------------------',
|
||||
|
@ -499,6 +501,7 @@ function generateDeclarationFile(recipe: string, sourceFileGetter: SourceFileGet
|
|||
].concat(enums).join(endl);
|
||||
resultEnums = resultEnums.split(/\r\n|\n|\r/).join(endl);
|
||||
resultEnums = format(resultEnums, endl);
|
||||
resultEnums = resultEnums.split(/\r\n|\n|\r/).join(endl);
|
||||
|
||||
return {
|
||||
result: resultTxt,
|
||||
|
|
Loading…
Reference in New Issue