{"size": 2053, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "thabets/ReadMeGenerator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "index.js", "max_issues_repo_name": "thabets/ReadMeGenerator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "index.js", "max_forks_repo_name": "thabets/ReadMeGenerator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.3152173913, "max_line_length": 118, "alphanum_fraction": 0.6103263517}
// TODO: Include packages needed for this application
const inquirer = require("inquirer");
const fs = require("fs");
const generateMarkdown = require("./utils/generateMarkdown");

// TODO: Create an array of questions for user input

const questions = [
  {
    type: "input",
    message: "Please provide a Title that you would like for the project?",
    name: "title",
  },
  {
    type: "input",
    name: "name",
    message: "What is the Creators Name?",
  },
  {
    type: "input",
    message:
      "Please write a short Description regarding what the application will do?",
    name: "description",
  },
  {
    type: "input",
    message:
      "Provide description on how the user will utilize this application:",
    name: "Usage",
  },
  {
    type: "list",
    message: "What license will you require?",
    name: "license",
    choices: [
      "MIT",
      "IBM",
      "ISC",
      "Mozilla",
      "Apache 2.0",
      "Boost",
      "BSD",
      "None",
    ],
  },
  {
    type: "input",
    message:
      "Are there any contributors to this project? If so please provide their names?",
    name: "contributor",
  },
  {
    type: "input",
    message: "Please provide your email address ",
    name: "email",
  },
  {
    type: "input",
    message: "Please provide your repository link ",
    name: "repository",
  },
  {
    type: "input",
    message: "If there is a screenshot please provide link to screenshot",
    name: "screenshot",
  },
  {
    type: "input",
    message: "Are there any links to an active URL",
    name:"activeURL"
  },

];

// TODO: Create a function to write README file
function writeToFile(data) {
  fs.writeFileSync("./output/README.md", generateMarkdown(data), "utf8");
  console.log("done");
}

// TODO: Create a function to initialize app
function init() {
  inquirer
    .prompt(questions) // Write the user response to a file by chaining the below callback method to the prompt above.
    .then(function (data) {
      writeToFile(data);
    });
}

// Function call to initialize app
init();
