UNPKG

mega-pkg

Version:

> This readme is written by the author of this package [amanuel](https://github.com/amanuel15)

42 lines (33 loc) 977 B
const inquirer = require("./inquire"); const files = require("./files"); const path = require("path"); const chalk = require("chalk"); const { postProcessNode } = require("./shell"); module.exports = async () => { const appDetails = await inquirer.askAppDetails(); const appDetailsFull = Object.assign(appDetails, { versionCode: 1, versionName: "1.0.0", independentStack: false, }); if ( !files.createProject( files.getCurrentDirectoryBase() + "/" + appDetails.appName ) ) { return; } files.writeFile( appDetails.appName, "manifest.json", JSON.stringify(appDetailsFull, null, 3) ); const templatePath = path.join(__dirname, "template"); files.createDirectoryContents(templatePath, appDetails.appName); console.log(chalk.green("Setup Complete installing dependencies")); const projectPath = path.join( files.getCurrentDirectoryBase(), appDetails.appName ); postProcessNode(projectPath); };