From 67542301be4edb22a2e85216c816b2788a4c6643 Mon Sep 17 00:00:00 2001 From: Geoff Seemueller Date: Thu, 14 Nov 2024 23:09:37 -0500 Subject: [PATCH] Refactor project structure and update build scripts Moved main files to the "src" directory and updated paths accordingly. Adjusted build, start, and dev scripts to use Bun. Added "dist" directory to .gitignore to prevent it from being tracked. --- .gitignore | 1 + package.json | 23 ++++++++++++----------- cli.ts => src/cli.ts | 2 +- index.ts => src/index.ts | 0 4 files changed, 14 insertions(+), 12 deletions(-) rename cli.ts => src/cli.ts (99%) rename index.ts => src/index.ts (100%) diff --git a/.gitignore b/.gitignore index 563dc83..3753da7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea/ /node_modules/ +/dist/ /prompt.md /todo diff --git a/package.json b/package.json index 4dc7a76..0918966 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,27 @@ + { "name": "workflow-function-manifold", "version": "1.0.6", "type": "module", "description": "for building dynamic, LLM-driven workflows using a region-based execution model", - "main": "lib.js", - "module": "lib.js", - "types": "lib.d.ts", + "main": "src/index.ts", + "module": "src/index.ts", "exports": { ".": { - "import": "./lib.js", - "require": "./lib.js" + "import": "./dist/index.js", + "require": "./dist/index.js" } }, "bin": { - "workflow-function-manifold": "./bin.js" + "workflow-function-manifold": "./dist/cli.js" }, "scripts": { - "start": "node bin.js", - "dev": "node bin.js", - "cli": "bun cli.ts", + "start": "bun src/cli.ts", + "dev": "bun src/cli.ts", + "build": "rm -rf ./dist && bun build src/* --outdir dist", + "cli": "bun src/cli.ts", "test": "echo \"Error: no test specified\" && exit 1", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx", + "lint": "eslint .", "deploy:dev": "pnpm publish .", "lint:fix": "eslint . --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,yml,yaml}\"", @@ -38,4 +39,4 @@ "prettier": "^3.3.3", "typescript": "^5.6.3" } -} +} \ No newline at end of file diff --git a/cli.ts b/src/cli.ts similarity index 99% rename from cli.ts rename to src/cli.ts index fe9302c..d64181d 100644 --- a/cli.ts +++ b/src/cli.ts @@ -4,7 +4,7 @@ import { WorkflowFunctionManifold, WorkflowOperator, NestedManifoldRegion, -} from '.'; +} from './index'; async function demonstrateNestedManifold() { const nestedIntentService = new DummyIntentMap(); diff --git a/index.ts b/src/index.ts similarity index 100% rename from index.ts rename to src/index.ts