Skip to content

Commit fae1a72

Browse files
authored
bind the commit and added FILE_PATH to commit
1 parent 323aef0 commit fae1a72

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
const jsonfile = require('jsonfile');
12
const moment = require('moment');
23
const simpleGit = require('simple-git')
34
const random = require('random')
5+
const FILE_PATH = "./data.json";
6+
47
const makeCommit = n => {
58
if(n===0) return simpleGit().push();
69
const x = random.int(0,54);
@@ -12,7 +15,10 @@ const makeCommit = n => {
1215
}
1316
console.log(DATE);
1417

18+
jsonfile.writeFile(FILE_PATH, data, () => {
19+
simpleGit().add([FILE_PATH]).commit(DATE, {'--date': DATE});
20+
});
1521

1622
}
1723

18-
makeCommit("91")
24+
makeCommit("91")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy