#!/usr/bin/env node
"use strict";
exports.__esModule = true;
var arg = require('arg');
var admin_1 = require("../commands/admin");
var dev_1 = require("../commands/dev");
var build_1 = require("../commands/build");
var version = require('../../package.json').version;
console.log("2fn v" + version);
try {
    var args = arg({
        '--admin': Boolean,
        '--dev': Boolean,
        '--build': Boolean
    });
    if (args['--admin']) {
        admin_1.admin();
    }
    else if (args['--dev']) {
        dev_1.dev();
    }
    else if (args['--build']) {
        build_1.build();
    }
}
catch (e) {
    console.log('Unknown command.', e);
    usage();
}
function usage() {
    console.log("\nnope\n  ");
}
