console-app/AppTest.js

39 lines
932 B
JavaScript
Raw Normal View History

2020-05-15 16:53:45 +02:00
/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of console-app which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
2020-05-09 21:33:16 +02:00
// @ts-nocheck
2020-05-09 19:51:43 +02:00
/* eslint-disable no-console */
2020-06-09 21:23:26 +02:00
/* eslint-disable id-match */
2020-07-10 08:38:58 +02:00
/* eslint-disable node/no-missing-require */
2020-06-09 21:23:26 +02:00
2020-05-09 19:51:43 +02:00
'use strict';
2020-06-09 21:23:26 +02:00
const {
StringOption,
BooleanOption,
NumberOption,
ArrayOption,
FolderOption
} = require ('./dist/lib/index.js');
2020-05-09 19:51:43 +02:00
(async () => {
2020-06-09 21:23:26 +02:00
const str = await new StringOption ({ name: 'str' })
.parse ();
const bool = await new BooleanOption ({ name: 'bool' })
.parse ();
const num = await new NumberOption ({ name: 'num' })
.parse ();
const arr = await new ArrayOption ({ name: 'arr' })
.parse ();
const fld = await new FolderOption ({ name: 'fld' })
.parse ();
const data = { str, bool, num, arr, fld };
console.log (data);
2020-05-09 19:51:43 +02:00
}) ();