console-app/AppTest.js
2020-05-18 11:03:49 +02:00

26 lines
826 B
JavaScript

/*
* 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
*/
// @ts-nocheck
/* eslint-disable no-console */
'use strict';
// eslint-disable-next-line node/no-missing-require, id-match
const { InteractiveOptions } = require ('./dist/lib/index.js');
(async () => {
const reader = new InteractiveOptions ([
{ name: 'str', type: 'string', env: 'TEST_STR' },
{ name: 'bool', type: 'boolean', env: 'TEST_BOOL' },
{ name: 'num', type: 'number', env: 'TEST_NUM' },
{ name: 'arr', type: 'array', env: 'TEST_ARR' },
{ name: 'fld', type: 'folder', env: 'TEST_FOLDER' }
]);
await reader.parse ();
console.log (reader.serialize (true));
}) ();