We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7cf87a commit d0eed0fCopy full SHA for d0eed0f
src/bin/parse.js
@@ -10,6 +10,7 @@ program
10
.option('-p, --path [type]', 'Input path', './chat')
11
.option('-o, --output [type]', 'Output options', 'data.json')
12
.option('-f, --force [type]', 'Force save if output file already exists', false)
13
+ .option('-c, --clean [type]', 'Clean -> drops the mongodown collection', false)
14
.option('-F, --facts [type]', 'Fact system files path', files => files.split(','), [])
15
.option('--host [type]', 'Mongo Host', 'localhost')
16
.option('--port [type]', 'Mongo Port', '27017')
@@ -28,7 +29,7 @@ fs.exists(program.output, (exists) => {
28
29
return process.exit();
30
}
31
- return facts.load(mongoURI, program.facts, true, (err, factSystem) => {
32
+ return facts.load(mongoURI, program.facts, program.clean, (err, factSystem) => {
33
parser.parseDirectory(program.path, { factSystem }, (err, result) => {
34
if (err) {
35
console.error(`Error parsing bot script: ${err}`);
0 commit comments