const minimist = require('minimist');


class KabaCli
{
    /**
     * @param {Object} cliArgv
     */
    constructor (cliArgv)
    {
        const argv = minimist(cliArgv, {
            boolean: ["dev", "d", "h", "help", "v", "version"],
        });

        /**
         * @private
         * @type {boolean}
         */
        this.dev = argv.d || argv.dev;

        /**
         * @private
         * @type {boolean}
         */
        this.version = argv.v || argv.version;

        /**
         * @private
         * @type {boolean}
         */
        this.help = argv.h || argv.help;
    }


    /**
     * Returns whether this is a dev build
     *
     * @return {boolean}
     */
    isDev ()
    {
        return this.dev;
    }

    /**
     * Returns whether the version info should be shown
     *
     * @return {boolean}
     */
    showVersion ()
    {
        return this.version;
    }

    /**
     * Returns whether the help should be shown
     *
     * @return {boolean}
     */
    showHelp ()
    {
        return this.help;
    }
}

module.exports = new KabaCli(process.argv.slice(2));

@@ -195,403 +195,1184 @@
 n: %5B
-%22dev%22, %22d%22, %22h%22, %22help%22, %22v%22, %22version%22%5D,%0A        %7D);%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.dev = argv.d %7C%7C argv.dev;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.version = argv.v %7C%7C argv.version;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.help = argv.h %7C%7C argv.help
+%0A                // dev = debug + watch + sourceMaps%0A                %22dev%22,%0A                %22d%22,%0A%0A                // debug%0A                %22debug%22,%0A%0A                // sourceMaps%0A                %22with-sourcemaps%22,%0A                %22with-source-maps%22,%0A%0A                // watch%0A                %22watch%22,%0A%0A                // help%0A                %22h%22,%0A                %22help%22,%0A%0A                // version%0A                %22v%22,%0A                %22version%22,%0A            %5D,%0A        %7D);%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.dev = argv.d %7C%7C argv.dev;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.debug = argv.debug;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.sourceMaps = argv%5B%22with-sourcemaps%22%5D %7C%7C argv%5B%22with-source-maps%22%5D;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.watch = argv.watch;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.help = argv.h %7C%7C argv.help;%0A%0A        /**%0A         * @private%0A         * @type %7Bboolean%7D%0A         */%0A        this.version = argv.v %7C%7C argv.version
 ;%0A  
@@ -1420,17 +1420,19 @@
  is a de
-v
+bug
  build%0A 
@@ -1478,17 +1478,190 @@
     isDe
-v
+bug ()%0A    %7B%0A        return this.debug %7C%7C this.dev;%0A    %7D%0A%0A%0A    /**%0A     * Returns whether to include sourcemaps%0A     *%0A     * @return %7Bboolean%7D%0A     */%0A    includeSourceMaps
  ()%0A    
@@ -1668,32 +1668,51 @@
 %7B%0A        return
+ this.sourceMaps %7C%7C
  this.dev;%0A    %7D
@@ -1705,32 +1705,33 @@
 his.dev;%0A    %7D%0A%0A
+%0A
     /**%0A     * R
@@ -1753,20 +1753,15 @@
 the 
-version info
+watcher
  sho
@@ -1759,37 +1759,41 @@
 tcher should be 
-shown
+activated
 %0A     *%0A     * @
@@ -1825,19 +1825,15 @@
     
-showVersion
+isWatch
  ()%0A
@@ -1858,23 +1858,33 @@
 rn this.
-version
+watch %7C%7C this.dev
 ;%0A    %7D%0A
@@ -1884,16 +1884,17 @@
 %0A    %7D%0A%0A
+%0A
     /**%0A
@@ -2035,16 +2035,182 @@
 ;%0A    %7D%0A
+%0A%0A    /**%0A     * Returns whether the version info should be shown%0A     *%0A     * @return %7Bboolean%7D%0A     */%0A    showVersion ()%0A    %7B%0A        return this.version;%0A    %7D%0A
 %7D%0A%0Amodul

Update CLI interface