Skip to content

Commit 4c2a323

Browse files
committed
go deploy
1 parent d1c0eda commit 4c2a323

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ bower_components
5454

5555
build/Release
5656

57+
58+
5759
# Dependency directories
5860

5961
node_modules/

index.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
#!/usr/bin/env bun
22

3-
import { generateColoredAsciiArt } from "./src/asciiArt";
4-
import BooleanTable from "./src/booleanTable";
5-
import CLI from "./src/CLI";
3+
import { runTool } from "./src";
64

7-
if (process.argv.length < 3 || process.argv.length > 4) {
8-
generateColoredAsciiArt("BOOLEAN-TABLE", "A simple Boolean Table Generator");
9-
CLI.displayHelp();
10-
} else {
11-
const expression = CLI.getExpression(process);
12-
13-
if (expression) {
14-
const booleanTable = new BooleanTable(expression);
15-
booleanTable.generateTable();
16-
}
17-
}
5+
runTool();

package.json

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
"name": "boolean-table",
33
"module": "index.ts",
44
"type": "module",
5+
"version": "0.1.0",
6+
"license": "MIT",
7+
"author": "KiritoEM",
8+
"description": "A simple Boolean Table Generator with basics operations",
9+
"repository": "https://github.com/KiritoEM/boolean-table",
10+
"keywords": [
11+
"truth-table"
12+
],
513
"scripts": {
614
"boolean-table": "link:boolean-table"
715
},

src/index.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { generateColoredAsciiArt } from "./asciiArt";
2+
import BooleanTable from "./booleanTable";
3+
import CLI from "./CLI";
4+
5+
const runTool = () => {
6+
if (process.argv.length < 3 || process.argv.length > 4) {
7+
generateColoredAsciiArt("BOOLEAN-TABLE", "A simple Boolean Table Generator");
8+
CLI.displayHelp();
9+
} else {
10+
const expression = CLI.getExpression(process);
11+
12+
if (expression) {
13+
const booleanTable = new BooleanTable(expression);
14+
booleanTable.generateTable();
15+
}
16+
}
17+
}
18+
19+
export { runTool };

0 commit comments

Comments
 (0)