refactor: update file-graph package structure and integrate with game session management

This commit is contained in:
Justin Lin committed 2025-04-23 17:04:00 +08:00
1 parent 92173bb7e9
commit cfbc386c16
9 files changed
+44 -10

No files matched your search

+9 -5
View File
@@ -1,13 +1,17 @@
{
"name": "@linux-odyssey/file-graph",
"version": "1.0.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": "./dist/index.js",
"main": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
}
},
"license": "MIT",
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.cjs.json",
"dev": "tsc -w",
"test": "yarn build && jest"
}
+7
View File
@@ -1,3 +1,10 @@
export { default as File, FileObject } from './file.js'
export { default as FileNode } from './fileNode.js'
export { default as FileGraph, Event } from './fileGraph.js'
export interface INode {
path: string
type: string
discovered: boolean
children?: INode[]
}
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node",
"outDir": "./dist/cjs",
"declarationDir": "./dist/types"
}
}
+3 -1
View File
@@ -3,7 +3,9 @@
"compilerOptions": {
"rootDir": "src",
"composite": true,
"outDir": "./dist"
"module": "NodeNext",
"outDir": "./dist/esm",
"declarationDir": "./dist/types"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]