Skip to content

Commit 7461528

Browse files
committed
fix(@angular/cli): eject command removes EOF
Notably `package.json` and `tsconfig.json`. Fixed #5387.
1 parent 00fe4cc commit 7461528

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@angular/cli/tasks/eject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ export default Task.extend({
501501
packageJson['devDependencies'][packageName] = ourPackageJson['dependencies'][packageName];
502502
});
503503

504-
return writeFile('package.json', JSON.stringify(packageJson, null, 2));
504+
return writeFile('package.json', JSON.stringify(packageJson, null, 2) + '\n');
505505
})
506506
.then(() => JSON.parse(ts.sys.readFile(tsConfigPath)))
507507
.then((tsConfigJson: any) => {
@@ -512,7 +512,7 @@ export default Task.extend({
512512
'**/*.spec.ts'
513513
];
514514
}
515-
return writeFile(tsConfigPath, JSON.stringify(tsConfigJson, null, 2));
515+
return writeFile(tsConfigPath, JSON.stringify(tsConfigJson, null, 2) + '\n');
516516
})
517517
// Output the webpack.config.js.
518518
.then(() => writeFile('webpack.config.js', webpackConfigStr))

0 commit comments

Comments
 (0)