Skip to content

Commit

Permalink
Merge pull request #34 from Digital-Peak/new-line
Browse files Browse the repository at this point in the history
Add new line at the end of the generated es5 files
  • Loading branch information
dneukirchen authored Feb 21, 2018
2 parents bd0e31c + cdfaf69 commit 5d84a65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/build-modules-js/compile-es6.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const glob = require('glob');
const fs = require('fs');
const babel = require('babel-core');
const os = require('os');

const pattern = './**/*.es6.js';
const options = {
Expand All @@ -23,7 +24,7 @@ OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.`;
babel.transformFile(filePath, babelOptions, (error, result) => {
if (error) process.exit(1);
const fileName = filePath.slice(0, -7);
fs.writeFile(`${fileName}.js`, result.code, (fsError) => {
fs.writeFile(`${fileName}.js`, result.code + os.EOL, (fsError) => {
if (fsError) process.exit(1);
});
});
Expand Down

0 comments on commit 5d84a65

Please sign in to comment.