diff --git a/README.md b/README.md index dca29c55..d868cf80 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Run `bun bootstrap` to install dependencies and `bun cli.ts` to run test the cli To run tests, run `bun test` If you want to test developing, run `bun dev` and visit http://localhost:5173. The project being -loaded is inside `tests/assets/example-project` +loaded is inside `example-project` ![image](https://github.com/tscircuit/cli/assets/1910070/cabb180d-a64f-4fe5-a6af-26f990af39b3) @@ -54,7 +54,6 @@ loaded is inside `tests/assets/example-project` ![image](https://github.com/tscircuit/cli/assets/1910070/d6facd4d-0887-4871-8aa1-e525c519c50d) - ## Features Coming Soon - [`tsci format`](https://github.com/tscircuit/cli/issues/1) diff --git a/tests/assets/example-project/.gitignore b/example-project/.gitignore similarity index 100% rename from tests/assets/example-project/.gitignore rename to example-project/.gitignore diff --git a/tests/assets/example-project/README.md b/example-project/README.md similarity index 100% rename from tests/assets/example-project/README.md rename to example-project/README.md diff --git a/tests/assets/example-project/examples/basic-bug.tsx b/example-project/examples/basic-bug.tsx similarity index 100% rename from tests/assets/example-project/examples/basic-bug.tsx rename to example-project/examples/basic-bug.tsx diff --git a/tests/assets/example-project/examples/basic-capacitor.tsx b/example-project/examples/basic-capacitor.tsx similarity index 100% rename from tests/assets/example-project/examples/basic-capacitor.tsx rename to example-project/examples/basic-capacitor.tsx diff --git a/tests/assets/example-project/examples/basic-resistor.tsx b/example-project/examples/basic-resistor.tsx similarity index 100% rename from tests/assets/example-project/examples/basic-resistor.tsx rename to example-project/examples/basic-resistor.tsx diff --git a/tests/assets/example-project/index.ts b/example-project/index.ts similarity index 100% rename from tests/assets/example-project/index.ts rename to example-project/index.ts diff --git a/tests/assets/example-project/package-lock.json b/example-project/package-lock.json similarity index 100% rename from tests/assets/example-project/package-lock.json rename to example-project/package-lock.json diff --git a/tests/assets/example-project/package.json b/example-project/package.json similarity index 100% rename from tests/assets/example-project/package.json rename to example-project/package.json diff --git a/tests/assets/example-project/src/MyCircuit.tsx b/example-project/src/MyCircuit.tsx similarity index 100% rename from tests/assets/example-project/src/MyCircuit.tsx rename to example-project/src/MyCircuit.tsx diff --git a/tests/assets/example-project/src/manual-edits.ts b/example-project/src/manual-edits.ts similarity index 100% rename from tests/assets/example-project/src/manual-edits.ts rename to example-project/src/manual-edits.ts diff --git a/package.json b/package.json index 815956df..0c0135a9 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ "start": "bun cli.ts", "dev": "TSCI_DEV_SERVER_DB=$(pwd)/.tscircuit/devdb concurrently 'cd dev-server-api && bun run build && bun start' 'cd dev-server-frontend && bun start' 'bun run dev-with-test-project'", "clear": "rm -rf .tscircuit ./dev-server-api/.edgespec", - "start:dev-server": "bun build:dev-server && bun cli.ts dev -y --cwd ./tests/assets/example-project", + "start:dev-server": "bun build:dev-server && bun cli.ts dev -y --cwd ./example-project", "build:dev-server": "cd dev-server-api && bun run build && cd ../dev-server-frontend && bun run build", "build:dev-server:api": "cd dev-server-api && bun run build", "build:cli": "bun build-cli.ts", "build": "bun build:dev-server && npm run build:cli", - "dev-with-test-project": "bun cli.ts dev --cwd ./tests/assets/example-project", + "dev-with-test-project": "bun cli.ts dev --cwd ./example-project", "test:init": "bun cli.ts init --dir ./tmp/test --name test", - "update-deps": "bun add @tscircuit/builder@latest @tscircuit/react-fiber@latest && cd dev-server-frontend && bun run update-deps && cd ../tests/assets/example-project && bun run update-deps" + "update-deps": "bun add @tscircuit/builder@latest @tscircuit/react-fiber@latest && cd dev-server-frontend && bun run update-deps && cd ../example-project && bun run update-deps" }, "bin": { "tsci": "./dist/cli.js" diff --git a/tests/open.test.ts b/tests/open.test.ts index e6520069..5b6238ee 100644 --- a/tests/open.test.ts +++ b/tests/open.test.ts @@ -2,8 +2,7 @@ import { test, expect } from "bun:test" import { $ } from "bun" test("tsci open", async () => { - const result = - await $`bun cli.ts open -y --cwd ./tests/assets/example-project`.text() + const result = await $`bun cli.ts open -y --cwd ./example-project`.text() expect(result).toContain("http") expect(result).toContain("example-project") }) diff --git a/tests/soupify.test.ts b/tests/soupify.test.ts index e8e872e0..e1d26a8d 100644 --- a/tests/soupify.test.ts +++ b/tests/soupify.test.ts @@ -3,7 +3,7 @@ import { $ } from "bun" test("soupify", async () => { const result = - await $`bun cli.ts soupify -y --file ./tests/assets/example-project/examples/basic-bug.tsx`.text() + await $`bun cli.ts soupify -y --file ./example-project/examples/basic-bug.tsx`.text() expect(result).toContain("10kohm") })