git-changed-files
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -26,3 +26,4 @@ const chalk = require('chalk'); | ||
diffFilter: 'ACDMRTUXB', | ||
formats: false | ||
formats: false, | ||
showStatus: false | ||
}; | ||
@@ -29,0 +30,0 @@ |
{ | ||
"name": "git-changed-files", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "Get the change between any of your branch and current branch of a `git` repository", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -29,3 +29,3 @@ # git-changed-files | ||
(async() => { | ||
let committedGitFiles = await gitStatus(); | ||
let committedGitFiles = await gitChangedFiles(); | ||
console.log(committedGitFiles); | ||
@@ -40,3 +40,3 @@ })().catch((err) => { | ||
(async() => { | ||
let committedGitFiles = await gitStatus({ formats: ['*.yml'] }); | ||
let committedGitFiles = await gitChangedFiles({ formats: ['*.yml'] }); | ||
console.log(committedGitFiles); | ||
@@ -51,3 +51,3 @@ })().catch((err) => { | ||
(async() => { | ||
let committedGitFiles = await gitStatus({ formats: ['!*.yml'] }); | ||
let committedGitFiles = await gitChangedFiles({ formats: ['!*.yml'] }); | ||
console.log(committedGitFiles); | ||
@@ -62,3 +62,3 @@ })().catch((err) => { | ||
(async() => { | ||
let committedGitFiles = await gitStatus({ diffFilter: 'A' }); | ||
let committedGitFiles = await gitChangedFiles({ diffFilter: 'A' }); | ||
console.log(committedGitFiles); | ||
@@ -71,2 +71,18 @@ })().catch((err) => { | ||
(async() => { | ||
let committedGitFiles = await gitChangedFiles({ showStatus: true }); | ||
console.log(committedGitFiles); | ||
})().catch((err) => { | ||
console.log(err); | ||
}); | ||
/* | ||
Expected: | ||
[ { filename: '.editorconfig', status: 'Deleted' }, | ||
{ filename: '.travis.yml', status: 'Modified' }, | ||
{ filename: 'destroy.js', status: 'Added' }, | ||
{ filename: 'index.js', status: 'Modified' }, | ||
{ filename: 'package.json', status: 'Modified' } ] | ||
*/ | ||
``` | ||
@@ -122,2 +138,13 @@ | ||
##### showStatus | ||
Type: `boolean`<br /> | ||
Default: `false` | ||
To show the type of file change in the result. | ||
Example: If showStatus is true then output will be | ||
`[{ filename: '.editorconfig', status: 'Deleted' }]` | ||
## Built With | ||
@@ -124,0 +151,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4733
27
162