diff --git a/README.md b/README.md index eacec3c..3352638 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,9 @@ npm install --global @captainsafia/legit -h, --help output usage information -f --file The file to add a header to -u --user [user] The user/organization who holds the license - -y --year [year] The year the license is in effect + -y --year [year] The year the license is in effect. + If 'range' is used in place of a year, a date range from the first commit year + to the current year will be used. ``` ![Legit Demo](https://cloud.githubusercontent.com/assets/1857993/23821404/bea5dfc2-05f6-11e7-8525-7f5bd88a7829.gif) diff --git a/src/index.js b/src/index.js index 2dc8761..ef0e9b4 100755 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ program var yearArg; const userArg = this.user || username.sync(); - if (this.year === "auto") { + if (this.year === "range") { var firstCommitYear = firstCommitDate.sync(cwd + '/.git').getFullYear(); var currentYear = new Date().getFullYear(); if (currentYear === firstCommitYear) {