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:
parent
1de7fd23ef
commit
030e52b340
7 changed files with 415 additions and 249 deletions
|
@ -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();
|
Loading…
Add table
Add a link
Reference in a new issue