'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('tslib');
require('@component-controls/logger');
require('webpack');
require('path');
require('fs');
require('@component-controls/config');
require('@component-controls/core');
require('@component-controls/loader/plugin');
require('@component-controls/webpack-configs');
require('yargs');
var index = require('./index2.js');

const getArgs = (options) => {
    const argv = index.cliArgs(options);
    return argv.help().alias('help', 'h').argv;
};
const run = async (options) => {
    const argv = getArgs(options);
    process.env.NODE_ENV = argv.mode;
    const exec = argv.watch ? index.watch : index.compile;
    await exec({
        configPath: argv.config,
        presets: argv.presets,
        bundleName: argv.bundle,
        distFolder: argv.dist,
        staticFolder: argv.static,
        logOptions: {
            logLevel: argv.loglevel,
        },
    });
};

exports.cliArgs = index.cliArgs;
exports.defaultCliArgs = index.defaultCliArgs;
exports.getArgs = getArgs;
exports.run = run;
