Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
build/
*.log
277 changes: 277 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
// @ts-check
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
{
ignores: [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/*.d.ts",
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
},
);
18 changes: 18 additions & 0 deletions package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
{
"name": "tecode",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"test": "bun test",
"lint": "eslint ."
},
"devDependencies": {
"@eslint/js": "^9.19.0",
"@types/bun": "^1.3.11",
"eslint": "^9.19.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0"
}
}
9 changes: 9 additions & 0 deletions packages/api/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
{
"name": "@tecode/api",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"dependencies": {}
}
6 changes: 6 additions & 0 deletions packages/api/src/index.test.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
import { expect, test } from "bun:test";
import { API_PLACEHOLDER } from "./index";

test("placeholder", () => {
expect(API_PLACEHOLDER).toBe(true);
});
4 changes: 4 additions & 0 deletions packages/api/src/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
// Placeholder public API surface for @tecode/api.
// The real type declarations (Manifest, ExtensionContext, namespace
// interfaces, API_VERSION, etc.) are added in a later task.
export const API_PLACEHOLDER = true;
7 changes: 7 additions & 0 deletions packages/api/tsconfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": ["src"]
}
2 changes: 2 additions & 0 deletions packages/builtin/command-palette/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the command-palette built-in extension.
export const COMMAND_PALETTE_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/builtin/editor-core/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the editor-core built-in extension.
export const EDITOR_CORE_PLACEHOLDER = true;
6 changes: 6 additions & 0 deletions packages/builtin/explorer/index.test.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
import { expect, test } from "bun:test";
import { EXPLORER_PLACEHOLDER } from "./index";

test("placeholder", () => {
expect(EXPLORER_PLACEHOLDER).toBe(true);
});
2 changes: 2 additions & 0 deletions packages/builtin/explorer/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the explorer built-in extension.
export const EXPLORER_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/builtin/keybindings-editor/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the keybindings-editor built-in extension.
export const KEYBINDINGS_EDITOR_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/builtin/languages-basic/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the languages-basic built-in extension.
export const LANGUAGES_BASIC_PLACEHOLDER = true;
9 changes: 9 additions & 0 deletions packages/builtin/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
{
"name": "@tecode/builtin",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"@tecode/api": "workspace:*"
}
}
2 changes: 2 additions & 0 deletions packages/builtin/statusbar/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the statusbar built-in extension.
export const STATUSBAR_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/builtin/themes-default/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the themes-default built-in extension.
export const THEMES_DEFAULT_PLACEHOLDER = true;
4 changes: 4 additions & 0 deletions packages/builtin/tsconfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["**/*.ts"]
}
13 changes: 13 additions & 0 deletions packages/cli/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
{
"name": "@tecode/cli",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/main.ts",
"bin": {
"tecode": "src/main.ts"
},
"dependencies": {
"@tecode/core": "workspace:*"
}
}
14 changes: 14 additions & 0 deletions packages/cli/src/main.test.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
import { expect, test } from "bun:test";
import pkg from "../package.json";

test("--version prints the package version and exits 0", async () => {
const proc = Bun.spawn(["bun", "run", `${import.meta.dir}/main.ts`, "--version"], {
stdout: "pipe",
stderr: "pipe",
});
const stdout = await new Response(proc.stdout).text();
const exitCode = await proc.exited;

expect(stdout.trim()).toBe(pkg.version);
expect(exitCode).toBe(0);
});
10 changes: 10 additions & 0 deletions packages/cli/src/main.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
import pkg from "../package.json";

function main(argv: string[]): void {
if (argv.includes("--version")) {
console.log(pkg.version);
process.exit(0);
}
}

main(process.argv.slice(2));
8 changes: 8 additions & 0 deletions packages/cli/tsconfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"resolveJsonModule": true
},
"include": ["src"]
}
11 changes: 11 additions & 0 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
{
"name": "@tecode/core",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"dependencies": {
"@tecode/api": "workspace:*"
}
}
3 changes: 3 additions & 0 deletions packages/core/src/api/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
// Placeholder for building the concrete `tecode` namespace object handed to
// extensions.
export const API_BUILDER_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/core/src/buffer/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for Document, LineBuffer, UndoStack, DocumentManager.
export const BUFFER_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/core/src/commands/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the command registry.
export const COMMANDS_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/core/src/config/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for settings/keybindings loading, JSONC parser, file watcher.
export const CONFIG_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/core/src/host/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for the extension host (discovery, manifest validation, activation).
export const HOST_PLACEHOLDER = true;
6 changes: 6 additions & 0 deletions packages/core/src/index.test.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
import { expect, test } from "bun:test";
import { HOST_PLACEHOLDER } from "./index";

test("placeholder", () => {
expect(HOST_PLACEHOLDER).toBe(true);
});
8 changes: 8 additions & 0 deletions packages/core/src/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
// Placeholder entry point for @tecode/core. Real wiring lands in later tasks.
export { HOST_PLACEHOLDER } from "./host/index";
export { COMMANDS_PLACEHOLDER } from "./commands/index";
export { KEYMAP_PLACEHOLDER } from "./keymap/index";
export { BUFFER_PLACEHOLDER } from "./buffer/index";
export { UI_PLACEHOLDER } from "./ui/index";
export { CONFIG_PLACEHOLDER } from "./config/index";
export { API_BUILDER_PLACEHOLDER } from "./api/index";
3 changes: 3 additions & 0 deletions packages/core/src/keymap/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
// Placeholder for the keymap service (key event pipeline, chord state
// machine, when-clause evaluator).
export const KEYMAP_PLACEHOLDER = true;
2 changes: 2 additions & 0 deletions packages/core/src/ui/index.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
// Placeholder for Shell, slot registry, theme provider, common components.
export const UI_PLACEHOLDER = true;
7 changes: 7 additions & 0 deletions packages/core/tsconfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": ["src"]
}
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"strict": true,
"module": "Preserve",
"moduleResolution": "bundler",
"target": "ESNext",
"lib": ["ESNext"],
"types": ["bun"],
"noEmit": true,
"skipLibCheck": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
}
}