Skip to content

Commit a6dba05

Browse files
Generate declaration files
1 parent cc64f95 commit a6dba05

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

package.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,40 @@
22
"name": "talon-tools",
33
"displayName": "Talon tools",
44
"version": "0.1.0",
5+
"description": "Linting and formatting tools for Talon and Cursorless",
6+
"author": "Andreas Arvidsson",
7+
"publisher": "AndreasArvidsson",
58
"license": "MIT",
69
"type": "module",
710
"files": [
8-
"out/*",
9-
"LICENSE"
11+
"out"
1012
],
13+
"types": "./out/lib/index.d.ts",
1114
"exports": {
12-
".": "./out/lib.js"
15+
".": {
16+
"types": "./out/lib/index.d.ts",
17+
"default": "./out/lib.js"
18+
}
1319
},
1420
"bin": {
15-
"snippet-fmt": "./out/snippetFormatter.js",
16-
"talon-fmt": "./out/talonFormatter.js",
17-
"tree-sitter-fmt": "./out/treeSitterFormatter.js"
21+
"snippet-fmt": "out/snippetFormatter.js",
22+
"talon-fmt": "out/talonFormatter.js",
23+
"tree-sitter-fmt": "out/treeSitterFormatter.js"
1824
},
1925
"repository": {
2026
"type": "git",
21-
"url": "https://github.com/cursorless-dev/talon-tools"
27+
"url": "git+https://github.com/cursorless-dev/talon-tools.git"
2228
},
2329
"funding": "https://github.com/sponsors/cursorless-dev",
2430
"sponsor": {
2531
"url": "https://github.com/sponsors/cursorless-dev"
2632
},
2733
"scripts": {
2834
"prepack": "npm run build",
29-
"build": "tsx ./src/build.ts",
35+
"build": "tsc -p . && tsx ./src/build.ts",
3036
"clean": "rm -rf out",
3137
"lint": "npm run lint:ts &&npm run lint:fmt",
32-
"lint:ts": "tsc -p . && eslint src",
38+
"lint:ts": "eslint src",
3339
"lint:fmt": "prettier --check .",
3440
"fix": "npm run fix:ts && npm run fix:fmt",
3541
"fix:ts": "eslint src --fix",

tsconfig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
"target": "esnext",
55
"moduleResolution": "nodenext",
66
"rootDir": "src",
7+
"outDir": "out",
78
"esModuleInterop": true,
89
"resolveJsonModule": true,
9-
"noEmit": true,
10+
"declaration": true,
11+
"emitDeclarationOnly": true,
12+
"declarationMap": false,
1013
"strict": true,
1114
"noImplicitAny": true,
1215
"forceConsistentCasingInFileNames": true,
1316
"noImplicitReturns": true
1417
},
15-
"include": ["src"]
18+
"include": ["src"],
19+
"exclude": ["src/test", "src/cli", "src/build.ts"]
1620
}

0 commit comments

Comments
 (0)