verup adds \n at the end of JSON files

This commit is contained in:
Dumitru Uzun 2015-04-20 14:24:20 +03:00
parent d1a18c6ff1
commit 32db7bfb97
5 changed files with 9 additions and 5 deletions

View File

@ -15,7 +15,7 @@
* *
* *
* @author Dumitru Uzun (DUzun.Me) * @author Dumitru Uzun (DUzun.Me)
* @version 1.0.0 * @version 1.1.0
*/ */
var path = require('path'); var path = require('path');
@ -68,6 +68,7 @@ if ( over ) {
var buf = JSON.stringify(packo, null, 2); var buf = JSON.stringify(packo, null, 2);
if ( buf && over != nver ) { if ( buf && over != nver ) {
buf += "\n";
fs.writeFileSync(packFile, buf); fs.writeFileSync(packFile, buf);
} }
@ -82,6 +83,9 @@ if ( over ) {
var packo = JSON.parse(cnt); var packo = JSON.parse(cnt);
packo.version = nver; packo.version = nver;
buf = JSON.stringify(packo, null, 2); buf = JSON.stringify(packo, null, 2);
if ( buf ) {
buf += "\n";
}
} break; } break;
default: { default: {