1 |
|
2 |
|
3 | const yargsParser = require('yargs-parser');
|
4 |
|
5 | const debug = require('../commands/debug')
|
6 |
|
7 | const argv = yargsParser(process.argv.slice(2))
|
8 |
|
9 | const command = argv._[0]
|
10 |
|
11 | if (command === 'debug') {
|
12 | if(argv['executablePath']){
|
13 | process.PUPPETEER_EXECUTABLE_PATH = process.env.PUPPETEER_EXECUTABLE_PATH = argv['executablePath']
|
14 | }
|
15 | debug.run({
|
16 | logger: console,
|
17 | parameters: {
|
18 | options: argv
|
19 | },
|
20 | meta: {
|
21 | generateHelp() {}
|
22 | }
|
23 | })
|
24 | }
|