Skip to content

Commit 6c05a1d

Browse files
Merge pull request #24 from explore-node-js/eugene-matvejev-patch-1
update package.json
2 parents 23b1e9f + b59c030 commit 6c05a1d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-parameter-handler",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "build JSON files which can be used as settings",
55
"main": "index.js",
66
"repository": {

src/processor.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ module.exports = class Processor {
2828
this.files.forEach(file => {
2929
console.log(chalk.green(`>>>>> ${file.getOutputPath()}`));
3030

31-
fs.writeFile(file.getOutputPath(), JSON.stringify(file.getContent(), null, 2), 'UTF-8');
31+
fs.writeFile(
32+
file.getOutputPath(),
33+
JSON.stringify(file.getContent(), null, 2),
34+
{ encoding: 'UTF-8'},
35+
(e) => { console.log(chalk.red(` >>>>> error ${e}`)); }
36+
);
3237
});
3338
}
3439

0 commit comments

Comments
 (0)