Skip to content

Commit

Permalink
feat(licenses): added bsd 3-clause license
Browse files Browse the repository at this point in the history
  • Loading branch information
accraze committed Mar 3, 2016
1 parent d428392 commit 5e4d483
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var questions = [
type: "list",
name: "license",
message: "Choose a License",
choices: [ "MIT", "ISC", "UNLICENSE", "NO LICENSE" ]
choices: [ "MIT", "ISC", "BSD 3", "UNLICENSE", "NO LICENSE" ]
}
];

Expand Down
26 changes: 26 additions & 0 deletions src/licenses/bsd3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@


var bsd3 = "\nAll rights reserved.\n\n"+
"Redistribution and use in source and binary forms, with or without\n" +
"modification, are permitted provided that the following conditions are met:\n\n" +
"* Redistributions of source code must retain the above copyright notice, this\n" +
" list of conditions and the following disclaimer.\n\n" +
"* Redistributions in binary form must reproduce the above copyright notice,\n" +
" this list of conditions and the following disclaimer in the documentation\n" +
" and/or other materials provided with the distribution.\n\n" +
"* Neither the name of copyright holder nor the names of its\n" +
" contributors may be used to endorse or promote products derived from\n" +
" this software without specific prior written permission.\n\n" +
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" +
"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" +
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n" +
"DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n" +
"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" +
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n" +
"SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n" +
"CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n"+
"OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"+
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";


module.exports = bsd3;
10 changes: 10 additions & 0 deletions src/make-license.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var fs = require('fs');
var inquirer = require("inquirer");
var mit = require("./licenses/mit")
var isc = require("./licenses/isc")
var bsd3 = require("./licenses/bsd3")
var unlicense = require("./licenses/unlicense")

module.exports = makeLicense
Expand All @@ -26,6 +27,15 @@ function makeLicense (args) {
print(license);
});
}
else if (args.license === 'BSD 3'){
var questions = copyrightQuestions();
inquirer.prompt(questions, function(answers){
var license = "Copyright (c) "
license += answers.years + ", " + answers.name;
license += bsd3;
print(license);
});
}
else if (args.license === 'NO LICENSE'){
var questions = copyrightQuestions();
inquirer.prompt(questions, function(answers){
Expand Down

0 comments on commit 5e4d483

Please sign in to comment.