Skip to content

Commit cb91607

Browse files
Restructure project with separate folders for each formatter
1 parent f625d73 commit cb91607

16 files changed

Lines changed: 22 additions & 19 deletions

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
"license": "MIT",
99
"type": "module",
1010
"files": [
11-
"out"
11+
"out",
12+
"!out/test",
13+
"!out/cli",
14+
"!out/build.*"
1215
],
13-
"types": "./out/lib/index.d.ts",
16+
"types": "./out/lib.d.ts",
1417
"exports": {
1518
".": {
16-
"types": "./out/lib/index.d.ts",
19+
"types": "./out/lib.d.ts",
1720
"default": "./out/lib.js"
1821
}
1922
},

src/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function build() {
1212
sourcemap: true,
1313

1414
entryPoints: {
15-
lib: "src/lib/index.ts",
15+
lib: "src/lib.ts",
1616
snippetFormatter: "src/cli/snippetFormatter.ts",
1717
talonFormatter: "src/cli/talonFormatter.ts",
1818
treeSitterFormatter: "src/cli/treeSitterFormatter.ts",

src/cli/snippetFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import { snippetFormatter } from "../lib/snippetFormatter.js";
3+
import { snippetFormatter } from "../snippet/snippetFormatter.js";
44
import { main } from "./cli.js";
55

66
const fileEnding = "snippet";

src/cli/talonFormatter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

3-
import { talonListFormatter } from "../lib/index.js";
4-
import { talonFormatter } from "../lib/talonFormatter.js";
3+
import { talonListFormatter } from "../lib.js";
4+
import { talonFormatter } from "../talon/talonFormatter.js";
55
import { parseText } from "../util/parseText.js";
66
import { main } from "./cli.js";
77

src/cli/treeSitterFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import { treeSitterFormatter } from "../lib/treeSitterFormatter.js";
3+
import { treeSitterFormatter } from "../treeSitterFormatter.js";
44
import { parseText } from "../util/parseText.js";
55
import { main } from "./cli.js";
66

src/lib.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export { talonFormatter } from "./talon/talonFormatter.js";
2+
export { talonListFormatter } from "./talon/talonListFormatter.js";
3+
export { treeSitterFormatter } from "./treeSitterFormatter.js";
4+
export { snippetFormatter } from "./snippet/snippetFormatter.js";

src/lib/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)