Skip to content

Commit

Permalink
write JSON (not object) to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
claasahl committed Jan 15, 2019
1 parent 57886bb commit 458aaf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ init(dir, initFile, configData, function(_er, _data) {
"pre-commit": "pretty-quick --staged"
}
};
fs.writeFileSync(packageFile, { husky, ..._data });
fs.writeFileSync(packageFile, JSON.stringify({ husky, ..._data }, null, 2));

(async () => {
await execa("npm", ["install", "typescript", "@types/node", "--save-dev"]);
Expand Down

0 comments on commit 458aaf6

Please sign in to comment.