Skip to content

Commit a20064d

Browse files
committed
chore: Follow directions #5 and #6 from docs link
- https://www.cursorless.org/docs/contributing/adding-a-new-package/
1 parent 33e2003 commit a20064d

File tree

4 files changed

+338
-18
lines changed

4 files changed

+338
-18
lines changed

packages/generate-examples/package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,33 @@
22
"name": "@cursorless/generate-examples",
33
"version": "0.0.1",
44
"type": "module",
5+
"description": "Temp home for SimeonC's cursorless examples generator",
56
"scripts": {
67
"build": "tsx src/lib/buildDictionary",
78
"test": "jest",
8-
"test:watch": "jest --watch"
9+
"test:watch": "jest --watch",
10+
"compile:tsc": "tsc --build",
11+
"compile:esbuild": "esbuild ./src/index.ts --sourcemap --format=esm --bundle --packages=external --outfile=./out/index.js",
12+
"compile": "pnpm compile:tsc && pnpm compile:esbuild",
13+
"watch:tsc": "pnpm compile:tsc --watch",
14+
"watch:esbuild": "pnpm compile:esbuild --watch",
15+
"watch": "pnpm run --filter @cursorless/generate-examples --parallel '/^watch:.*/'",
16+
"clean": "rm -rf ./out tsconfig.tsbuildinfo ./dist ./build"
917
},
1018
"dependencies": {
1119
"fs-extra": "11.1.0",
1220
"prettier": "2.8.4",
1321
"shiki": "0.14.3",
1422
"tsx": "3.12.7",
1523
"yaml": "2.2.1"
24+
},
25+
"license": "MIT",
26+
"main": "./out/index.js",
27+
"types": "./out/index.d.ts",
28+
"exports": {
29+
".": {
30+
"cursorless:bundler": "./src/index.ts",
31+
"default": "./out/index.js"
32+
}
1633
}
1734
}

packages/generate-examples/tsconfig.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,11 @@
99
"noPropertyAccessFromIndexSignature": true,
1010
"noImplicitReturns": true,
1111
"noFallthroughCasesInSwitch": true,
12-
"esModuleInterop": true
12+
"esModuleInterop": true,
13+
"rootDir": "src",
14+
"outDir": "out"
1315
},
1416
"files": [],
15-
"include": [],
16-
"references": [
17-
{
18-
"path": "./tsconfig.lib.json"
19-
},
20-
{
21-
"path": "./tsconfig.spec.json"
22-
}
23-
]
17+
"include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"],
18+
"references": []
2419
}

0 commit comments

Comments
 (0)