Merge pull request #859 from napi-rs/fix-newline

fix: always add a newline at the end of the file when generating js-binding.js
This commit is contained in:
LongYinan 2021-11-16 13:42:21 +08:00 committed by GitHub
commit 41037ec193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,7 +345,7 @@ async function writeJsBinding(
}, '') }, '')
await writeFileAsync( await writeFileAsync(
distFileName, distFileName,
template + declareCodes + exportsCode, template + declareCodes + exportsCode + '\n',
'utf8', 'utf8',
) )
} }