minecraft-modpack
Version:
Minecraft modpack creation made easy
120 lines (119 loc) • 3.11 kB
JavaScript
const chalk = require("chalk");
const fs = require("fs");
const path = require("path");
const inquirer = require("inquirer");
module.exports = async function(){
const obj = await inquirer.prompt([
{
type: "input",
message: chalk.rgb(0,255,0)`Name of modpack\n`,
name: "modpack"
},
{
type: "input",
message: chalk.cyan`Author\n`,
name: "author"
},
{
type: "input",
message: chalk.yellow`Version\n`,
name: "version"
},
{
type: "list",
message: chalk.red`Game version\n`,
choices: [
"1.0",
"1.1",
"1.2.1",
"1.2.2",
"1.2.3",
"1.2.4",
"1.2.5",
"1.3.1",
"1.3.2",
"1.4.2",
"1.4.4",
"1.4.5",
"1.4.6",
"1.4.7",
"1.5.1",
"1.5.2",
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.7.2",
"1.7.3",
"1.7.4",
"1.7.5",
"1.7.6",
"1.7.7",
"1.7.8",
"1.7.9",
"1.7.10",
"1.8",
"1.8.1",
"1.8.2",
"1.8.3",
"1.8.4",
"1.8.5",
"1.8.6",
"1.8.7",
"1.8.8",
"1.8.9",
"1.9",
"1.9.1",
"1.9.2",
"1.9.3",
"1.9.4",
"1.10",
"1.10.1",
"1.10.2",
"1.11.1",
"1.11.2",
"1.12",
"1.12.1",
"1.12.2",
"1.13",
"1.13.1",
"1.13.2",
"1.14",
"1.14.1",
"1.14.2",
"1.14.3",
"1.14.4"
],
name: "gameVersion"
},
{
type: "checkbox",
message: chalk.magenta`Categories\n`,
choices: [
"Technological",
"Magic",
"Sci-Fi",
"Adventure and RPG",
"Exploration",
"Mini Game",
"Quest",
"Hardcore",
"Map Based",
"Small / Light",
"Extra Large",
"Combat / PVP",
"Multiplayer",
"FTB Official Pack",
"Skyblock"
],
name: "categories"
},
{
type: "text",
message: chalk.cyan`Modpack icon`,
name: "icon"
}
]);
obj.mods = [];
fs.writeFileSync(path.resolve(process.cwd(), "pack.cfg"), JSON.stringify(obj, undefined, 4));
};