function renderLicenseBadge(fileName, answers) {
  if (answers.license == "MIT License") {
    fs.appendFile(
      fileName,
      `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU Lesser General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Mozilla Public License 2.0") {
    fs.appendFile(
      fileName,
      `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU Affero General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Unlicense") {
    fs.appendFile(
      fileName,
      `[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Apache License 2.0") {
    fs.appendFile(
      fileName,
      `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  }
}
//Writes a license badge img to the file depending on which choice the user makes.
Writes a license badge img to the file depending on which choice the user makes.
Writes a license badge img to the file depending on which choice the user makes .
function renderLicenseBadge(fileName, answers) {
  if (answers.license == "MIT License") {
    fs.appendFile(
      fileName,
      `[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU Lesser General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Mozilla Public License 2.0") {
    fs.appendFile(
      fileName,
      `[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU Affero General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Unlicense") {
    fs.appendFile(
      fileName,
      `[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "Apache License 2.0") {
    fs.appendFile(
      fileName,
      `[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  } else if (answers.license == "GNU General Public License v3.0") {
    fs.appendFile(
      fileName,
      `[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)`,
      (err) => {
        if (err) {
          console.log("Error");
        }
      }
    );
  }
}
function renderLicenseBadge ( fileName , answers ) { if ( answers . license == "MIT License" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "GNU Lesser General Public License v3.0" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "Mozilla Public License 2.0" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "GNU Affero General Public License v3.0" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "Unlicense" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "Apache License 2.0" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } else if ( answers . license == "GNU General Public License v3.0" ) { fs . appendFile ( fileName , ` ` , ( err ) => { if ( err ) { console . log ( "Error" ) ; } } ) ; } }
Writes a license badge img to the file depending on which choice the user makes.
Writes a license badge img to the file depending on which choice the user makes .