-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy pathindex.js
More file actions
43 lines (34 loc) · 1.1 KB
/
index.js
File metadata and controls
43 lines (34 loc) · 1.1 KB
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
43
import program from 'commander';
import importHandler from './import';
import exportHandler from './export';
import projectInfo from '../../package.json';
function dbml2sql (args) {
program.version(projectInfo.version);
program
.usage('[options] <files...>')
.option('--mysql')
.option('--postgres')
.option('--mssql')
.option('--sqlite')
.option('-o, --out-file <pathspec>', 'compile all input files into a single files');
// .option('-d, --out-dir <pathspec>', 'compile an input directory of dbml files into an output directory');
program.parse(args);
exportHandler(program);
}
function sql2dbml (args) {
program.version(projectInfo.version);
program
.usage('[options] <files...>')
.option('--mysql')
.option('--postgres')
.option('--postgres-legacy')
.option('--mssql')
.option('-o, --out-file <pathspec>', 'compile all input files into a single files');
// .option('-d, --out-dir <pathspec>', 'compile an input directory of sql files into an output directory');
program.parse(args);
importHandler(program);
}
export {
dbml2sql,
sql2dbml,
};