mirror of
https://github.com/dilllxd/gitfolio.git
synced 2024-08-14 22:28:09 +00:00
v0.1.3
-added cli support (thanks @rohit-smpx) -arguments for fork -you can now sort and order repos -fixed bugs
This commit is contained in:
parent
81e8302b22
commit
6fb6408534
13 changed files with 1853 additions and 1056 deletions
|
@ -1,44 +1,51 @@
|
|||
#! /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 {blogCommand} = require('../blog');
|
||||
const {version} = require('../package.json');
|
||||
|
||||
program
|
||||
.command('build <username>')
|
||||
.description('Build site with your GitHub username. This will be used to customize your site')
|
||||
.option('-t, --theme [theme]', 'specify a theme to use', 'light')
|
||||
.option('-b, --background [background]', 'set the background image')
|
||||
.option('-f, --fork', 'includes forks with repos')
|
||||
.option('-s, --sort [sort]', 'set default sort for repository', 'created')
|
||||
.option('-o, --order [order]', 'set default order on sort', 'asc')
|
||||
.action(buildCommand)
|
||||
|
||||
program
|
||||
.command('update')
|
||||
.action(updateCommand);
|
||||
|
||||
program
|
||||
.command('blog <title>')
|
||||
.description('Create blog with specified title')
|
||||
.option('-s, --subtitle [subtitle]', 'give blog a subtitle', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.')
|
||||
.option('-p, --pagetitle [pagetitle]', 'give blog page a title')
|
||||
.option('-f, --folder [folder]', 'give folder a title (use "-" instead of spaces)')
|
||||
.action(blogCommand);
|
||||
|
||||
program.on('command:*', () => {
|
||||
console.log('Unknown Command: ' + program.args.join(' '))
|
||||
program.help()
|
||||
});
|
||||
|
||||
program
|
||||
.version(version, '-v --version')
|
||||
.usage('<command> [options]')
|
||||
.parse(process.argv);
|
||||
|
||||
if (program.args.length === 0) program.help();
|
||||
/* 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 {blogCommand} = require('../blog');
|
||||
const {runCommand} = require('../run');
|
||||
const {version} = require('../package.json');
|
||||
|
||||
program
|
||||
.command('build <username>')
|
||||
.description('Build site with your GitHub username. This will be used to customize your site')
|
||||
.option('-t, --theme [theme]', 'specify a theme to use', 'light')
|
||||
.option('-b, --background [background]', 'set the background image')
|
||||
.option('-f, --fork', 'includes forks with repos')
|
||||
.option('-s, --sort [sort]', 'set default sort for repository', 'created')
|
||||
.option('-o, --order [order]', 'set default order on sort', 'asc')
|
||||
.action(buildCommand)
|
||||
|
||||
program
|
||||
.command('update')
|
||||
.description('Update user and repository data')
|
||||
.action(updateCommand);
|
||||
|
||||
program
|
||||
.command('blog <title>')
|
||||
.description('Create blog with specified title')
|
||||
.option('-s, --subtitle [subtitle]', 'give blog a subtitle', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.')
|
||||
.option('-p, --pagetitle [pagetitle]', 'give blog page a title')
|
||||
.option('-f, --folder [folder]', 'give folder a title (use "-" instead of spaces)')
|
||||
.action(blogCommand);
|
||||
|
||||
program
|
||||
.command('run')
|
||||
.description('Run build files')
|
||||
.action(runCommand);
|
||||
|
||||
program.on('command:*', () => {
|
||||
console.log('Unknown Command: ' + program.args.join(' '))
|
||||
program.help()
|
||||
});
|
||||
|
||||
program
|
||||
.version(version, '-v --version')
|
||||
.usage('<command> [options]')
|
||||
.parse(process.argv);
|
||||
|
||||
if (program.args.length === 0) program.help();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue