@appthen/cli 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/main.js +35 -0
- package/dist/index.js +25 -13
- package/package.json +11 -3
package/bin/main.js
CHANGED
|
@@ -43,6 +43,41 @@ program
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
+
program
|
|
47
|
+
.command('watch')
|
|
48
|
+
.description('start watch service')
|
|
49
|
+
.requiredOption('-p, --id <id>', 'project id')
|
|
50
|
+
.requiredOption('-a, --auth <auth>', 'auth token')
|
|
51
|
+
.option('-cc, --clear <clear>', 'clear cache')
|
|
52
|
+
// .option('-i, --input <input>', 'specify the input schema file')
|
|
53
|
+
.option('-o, --output <output>', 'specify the output directory', 'generated')
|
|
54
|
+
.option('-fn, --filter <filter>', 'filter docments')
|
|
55
|
+
.option('-fd, --folder <folder>', 'filter docments by folder')
|
|
56
|
+
.option('-fr, --frame <frame>', 'code frame web or app')
|
|
57
|
+
.option('-env, --env <env>', 'lowcode env')
|
|
58
|
+
.option('-c, --cwd <cwd>', 'specify the working directory', '.')
|
|
59
|
+
.option('-m, --mode <mode>', 'watching mode', '.')
|
|
60
|
+
.option('-a, --account <account>', 'user id', '.')
|
|
61
|
+
.option(
|
|
62
|
+
'-q, --quiet',
|
|
63
|
+
'be quiet, do not output anything unless get error',
|
|
64
|
+
false
|
|
65
|
+
)
|
|
66
|
+
.option('-vb, --verbose', 'be verbose, output more information', false)
|
|
67
|
+
.arguments('[input-schema] ali lowcode schema JSON file')
|
|
68
|
+
.action(function doGenerate(inputSchema, command) {
|
|
69
|
+
var options = command.opts();
|
|
70
|
+
if (options.cwd) {
|
|
71
|
+
process.chdir(options.cwd);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
require('../dist/index.js')
|
|
75
|
+
.startWatching(options)
|
|
76
|
+
.then((retCode) => {
|
|
77
|
+
// process.exit(retCode);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
46
81
|
program
|
|
47
82
|
.command('version', { isDefault: false })
|
|
48
83
|
.description('show cli version')
|