Skip to content

Commit

Permalink
feat(cli): 添加测试规则字符串命令
Browse files Browse the repository at this point in the history
  • Loading branch information
aooiuu committed Sep 3, 2024
1 parent f9646c8 commit b81667e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cli/src/command/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { createAnalyzerManager } from '@any-reader/core';
export default (program: Command) => {
program
.command('analyze')
.argument('<rule>', '')
.argument('[result]', '', '')
.description('测试规则字符串')
.argument('<rule>', '规则字符串, 比如 `@js:1+1@js:result * result`')
.argument('[result]', 'result变量', '')
.action(async (rule, result) => {
const res = await createAnalyzerManager().getString(rule, result);
console.log(res);
Expand Down

0 comments on commit b81667e

Please sign in to comment.