From e7d1b9fad97f490522cf6ba6387e73e73299d32a Mon Sep 17 00:00:00 2001 From: valcaza Date: Thu, 28 Mar 2019 12:25:11 +0100 Subject: [PATCH] Updated readme.md and performed --- cli.js | 35 +++++++++++++++++------------------ index.js | 2 +- readme.md | 29 ++++++++++++++--------------- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/cli.js b/cli.js index d4298e1..1f086a6 100755 --- a/cli.js +++ b/cli.js @@ -5,28 +5,27 @@ const meow = require('meow'); const gineta = require('.'); const cli = meow(` - Usage - gineta [directory] + Usage + gineta [directory] [output] Arguments - directory: Specify the directory to get the git information from - Examples - $ gineta + directory: Specify the directory to get the git information from. + output: Specify the optional output directory to write the output to. + Examples + $ gineta // => { - "date": "Wed Mar 27 15:11:39 CET 2019", - "hostname": "vikepic.computer", + "date": "Thu Mar 28 12:22:58 CET 2019", + "hostname": "vikepic.local", "username": "vikepic", - "gitCommitHash": "7858b44db7d0084466bafd1ab0681b10232ecba8", - "gitVersion": "* commit 7858b44db7d0084466bafd1ab0681b10232ecba8 (HEAD -> master, origin/master) - Author: vikepic - Date: Wed Mar 27 14:07:37 2019 +0100 - - :tada: Initial commit", - "gitDirty": "", - "gitChanges": "M cli.js - M index.js - M readme.md" - } + "commit": { + "hash": "7375605bd043d979a3a9edf09dee4964ca2c17c2", + "subject": "Added one-lined output", + "body": "", + "author": "vikepic", + "date": "Thu, 28 Mar 2019 12:21:35 +0100", + "changes": "1 file changed, 17 insertions(+), 7 deletions(-)" + } + } `); const originPath = cli.input[0]; diff --git a/index.js b/index.js index 1fc041e..ab53b12 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ module.exports = baseDir => { 'git', ['log', '--pretty=%s', '--max-count', '1'], useBaseDirOptions); -result.commit.body = getCommandOutput( + result.commit.body = getCommandOutput( 'git', ['log', '--pretty=%b', '--max-count', '1'], useBaseDirOptions); diff --git a/readme.md b/readme.md index 43366b6..cb07e99 100644 --- a/readme.md +++ b/readme.md @@ -12,27 +12,26 @@ $ npm install --global gineta $ gineta --help Usage - gineta [directory] + gineta [directory] [output] Arguments - directory: Specify the directory to get the git information from + directory: Specify the directory to get the git information from. + output: Specify the optional output directory to write the output to. Examples $ gineta // => { - "date": "Wed Mar 27 15:11:39 CET 2019", - "hostname": "vikepic.computer", + "date": "Thu Mar 28 12:22:58 CET 2019", + "hostname": "vikepic.local", "username": "vikepic", - "gitCommitHash": "7858b44db7d0084466bafd1ab0681b10232ecba8", - "gitVersion": "* commit 7858b44db7d0084466bafd1ab0681b10232ecba8 (HEAD -> master, origin/master) - Author: vikepic - Date: Wed Mar 27 14:07:37 2019 +0100 - - :tada: Initial commit", - "gitDirty": "", - "gitChanges": "M cli.js - M index.js - M readme.md" - } + "commit": { + "hash": "7375605bd043d979a3a9edf09dee4964ca2c17c2", + "subject": "Added one-lined output", + "body": "", + "author": "vikepic", + "date": "Thu, 28 Mar 2019 12:21:35 +0100", + "changes": "1 file changed, 17 insertions(+), 7 deletions(-)" + } + } ``` ## License