mirror of
https://github.com/filiprojek/nork.git
synced 2024-11-02 18:12:28 +01:00
25 lines
654 B
TypeScript
25 lines
654 B
TypeScript
|
import inquirer from 'inquirer'
|
||
|
import fs from 'fs-extra'
|
||
|
import path from 'path'
|
||
|
import Global from './global'
|
||
|
import { Questions } from './interfaces/SetupInterface'
|
||
|
|
||
|
export default class Setup {
|
||
|
static async setup(test = false) {
|
||
|
if (!test) {
|
||
|
const questions: Questions = {
|
||
|
type: 'list',
|
||
|
message: `Pick the technology you're using:`,
|
||
|
name: 'lang',
|
||
|
choices: [
|
||
|
{ name: 'Typescript', value: 'ts' },
|
||
|
{ name: 'Javascript', value: 'js' },
|
||
|
],
|
||
|
}
|
||
|
const answers = await inquirer.prompt(Object(questions))
|
||
|
fs.writeJsonSync(path.join(process.cwd(), './norkconfig.json'), answers)
|
||
|
}
|
||
|
return Global.logSuccess()
|
||
|
}
|
||
|
}
|