1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00

Add support for Telegram and email social links

This commit is contained in:
K4USTU3H 2019-12-07 21:48:12 +05:30
parent 1de7fd23ef
commit 030e52b340
7 changed files with 415 additions and 249 deletions

View file

@ -1,16 +1,33 @@
#! /usr/bin/env node
/* Argument parser */
const program = require("commander");
process.env.OUT_DIR = process.env.OUT_DIR || process.cwd();
const { buildCommand } = require("../build");
const { updateCommand } = require("../update");
const { uiCommand } = require("../ui");
const { runCommand } = require("../run");
const { version } = require("../package.json");
const
{
buildCommand
} = require("../build");
const
{
updateCommand
} = require("../update");
const
{
uiCommand
} = require("../ui");
const
{
runCommand
} = require("../run");
const
{
version
} = require("../package.json");
function collect(val, memo) {
function collect(val, memo)
{
memo.push(val);
return memo;
}
@ -29,6 +46,8 @@ program
.option("-l, --linkedin [username]", "specify linkedin username")
.option("-m, --medium [username]", "specify medium username")
.option("-d, --dribbble [username]", "specify dribbble username")
.option("-T, --telegram [username]", "specify telegram username")
.option("-e, --email [username]", "specify email")
.action(buildCommand);
program
@ -47,7 +66,8 @@ program
.option("-p, --port [port]", "provide a port for localhost, default is 3000")
.action(runCommand);
program.on("command:*", () => {
program.on("command:*", () =>
{
console.log("Unknown Command: " + program.args.join(" "));
program.help();
});
@ -57,4 +77,4 @@ program
.usage("<command> [options]")
.parse(process.argv);
if (program.args.length === 0) program.help();
if (program.args.length === 0) program.help();