Skip to content

Commit 9233731

Browse files
committed
use fs.writeFileSync
1 parent eb05eb4 commit 9233731

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/ionic/bower.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ exports.IonicBower = {
3535
saveData: function(bowerData) {
3636
try {
3737
var bowerFilePath = path.resolve('bower.json');
38-
39-
var file = fs.createWriteStream(bowerFilePath);
40-
file.write( JSON.stringify(bowerData, null, 2) );
41-
file.close();
38+
fs.writeFileSync( bowerFilePath, JSON.stringify(bowerData, null, 2) );
4239
} catch(e) {
4340
console.log( ('Error saving ' + bowerFilePath + ': ' + e).error.bold );
4441
}

0 commit comments

Comments
 (0)