UNPKG
cnr
Version:
latest (1.1.1)
1.1.1
1.0.1
1.0.0
check npm register quick and Individual
gitee.com/wu-yu-pei/cnr
cnr
/
index.js
16 lines
(12 loc)
•
317 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env node
const
program =
require
(
'commander'
)
const
{ helpOptions } =
require
(
'./lib/help.js'
)
const
{ main } =
require
(
'./lib/main.js'
)
// --help
helpOptions
()
// main
main
()
// node环境中进行 解析参数
program.
parse
(process.
argv
)
// 拿命令行里面的参数
const
options = program.
opts
()