-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web mode and cli interface): web mode and cli
- Loading branch information
Peter
committed
Oct 7, 2021
1 parent
01086fd
commit 95c924d
Showing
11 changed files
with
271 additions
and
221 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/local/bin/node | ||
import { program } from 'commander'; | ||
import fs from 'fs'; | ||
import { CriterionFabric } from '../estimate/criterionFabric'; | ||
|
||
program.requiredOption('-p, --path <path>', 'Markup file must have path'); | ||
|
||
program.parse(process.argv); | ||
const options = program.opts(); | ||
|
||
const fileContent = fs.readFileSync(options.path).toString('utf8'); | ||
const fileContentJson = JSON.parse(fileContent); | ||
|
||
const criteriaResult = new CriterionFabric(fileContentJson).run(); | ||
console.log(criteriaResult); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.