-
Notifications
You must be signed in to change notification settings - Fork 5
/
yohe
executable file
·42 lines (33 loc) · 975 Bytes
/
yohe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /usr/bin/env node
const program = require('commander');
program
.version('0.0.2')
.command('init [dir]')
.description('init a blog')
.action(require('./lib/init'))
program
.command('new <name>')
.description('create a new post')
.action(require('./lib/new.js'))
program
.command('meta')
.description('generate images meta data')
.action(require('./lib/image-optim.js'))
program
.command('server [dir]')
.description('preview the blog by running a local server')
.action(require('./lib/preview.js'))
program
.command('build [dir]')
.description('build the blog')
.option('-o, --output <dir>','render blog to html')
.action(require('./lib/build'))
program
.command('clean')
.description('clean the blog dir')
.action(require('./lib/clean.js'))
program
.command('page <name>')
.description('create a new page')
.action(require('./lib/page.js'))
program.parse(process.argv);