js: scaffold npm package with tsup build config
Swadhin Biswas committed 7 months ago
4b66fa2
1 parent 15c9713
commit 4b66fa2
3 files changed
+89 -0
Showing 3 changed files+89-0
▼JS/LICENSE
+21-0
| @@ -0,0 +1,21 @@ | ||
1 | +MIT License | |
2 | + | |
3 | +Copyright (c) 2025 Swadhin Biswas | |
4 | + | |
5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | |
6 | +of this software and associated documentation files (the "Software"), to deal | |
7 | +in the Software without restriction, including without limitation the rights | |
8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
9 | +copies of the Software, and to permit persons to whom the Software is | |
10 | +furnished to do so, subject to the following conditions: | |
11 | + | |
12 | +The above copyright notice and this permission notice shall be included in all | |
13 | +copies or substantial portions of the Software. | |
14 | + | |
15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
21 | +SOFTWARE. | |
0 | 22 | |
▼JS/package.json
+47-0
| @@ -0,0 +1,47 @@ | ||
1 | +{ | |
2 | + "name": "contexa", | |
3 | + "version": "0.1.1", | |
4 | + "description": "Git-inspired context management for LLM agents -- COMMIT, BRANCH, MERGE, and CONTEXT over versioned memory (arXiv:2508.00031)", | |
5 | + "author": "Swadhin Biswas <[email protected]>", | |
6 | + "main": "dist/index.js", | |
7 | + "module": "dist/index.mjs", | |
8 | + "types": "dist/index.d.ts", | |
9 | + "exports": { | |
10 | + ".": { | |
11 | + "types": "./dist/index.d.ts", | |
12 | + "import": "./dist/index.mjs", | |
13 | + "require": "./dist/index.js" | |
14 | + } | |
15 | + }, | |
16 | + "files": [ | |
17 | + "dist", | |
18 | + "LICENSE", | |
19 | + "README.md" | |
20 | + ], | |
21 | + "scripts": { | |
22 | + "build": "tsup src/index.ts --format cjs,esm --dts --clean", | |
23 | + "test": "tsx --test test.ts", | |
24 | + "lint": "eslint src" | |
25 | + }, | |
26 | + "keywords": ["llm", "agent", "context-management", "git", "memory", "gcc", "contexa"], | |
27 | + "license": "MIT", | |
28 | + "repository": { | |
29 | + "type": "git", | |
30 | + "url": "https://github.com/swadhinbiswas/contexa" | |
31 | + }, | |
32 | + "homepage": "https://github.com/swadhinbiswas/contexa", | |
33 | + "bugs": { | |
34 | + "url": "https://github.com/swadhinbiswas/contexa/issues" | |
35 | + }, | |
36 | + "dependencies": { | |
37 | + "js-yaml": "^4.1.0" | |
38 | + }, | |
39 | + "devDependencies": { | |
40 | + "@types/js-yaml": "^4.0.9", | |
41 | + "@types/node": "^20.0.0", | |
42 | + "tsup": "^8.0.0", | |
43 | + "tsx": "^4.0.0", | |
44 | + "typescript": "^5.4.0" | |
45 | + }, | |
46 | + "engines": { "node": ">=18" } | |
47 | +} | |
0 | 48 | |
▼JS/tsconfig.json
+21-0
| @@ -0,0 +1,21 @@ | ||
1 | +{ | |
2 | + "compilerOptions": { | |
3 | + "target": "ES2022", | |
4 | + "module": "Node16", | |
5 | + "moduleResolution": "Node16", | |
6 | + "lib": ["ES2022"], | |
7 | + "outDir": "dist", | |
8 | + "rootDir": "src", | |
9 | + "declaration": true, | |
10 | + "declarationMap": true, | |
11 | + "sourceMap": true, | |
12 | + "strict": true, | |
13 | + "esModuleInterop": true, | |
14 | + "skipLibCheck": true, | |
15 | + "forceConsistentCasingInFileNames": true, | |
16 | + "resolveJsonModule": true, | |
17 | + "isolatedModules": true | |
18 | + }, | |
19 | + "include": ["src"], | |
20 | + "exclude": ["node_modules", "dist", "test.ts"] | |
21 | +} | |
0 | 22 | |