diff --git a/eslint.config.mjs b/eslint.config.mjs index 66f6631d4..ae2d3c684 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -85,6 +85,7 @@ export default [ // ignore globally { ignores: [ + 'tools/mcp/**', '**/dist/**', '**/fixtures/**', '**/coverage/**', diff --git a/tools/mcp/README.md b/tools/mcp/README.md new file mode 100644 index 000000000..d98b798f6 --- /dev/null +++ b/tools/mcp/README.md @@ -0,0 +1,8 @@ +# Vue I18n MCP + +> [!WARNING] This is an experimental. please don't still use it. + + +## ©️ License + +[MIT](http://opensource.org/licenses/MIT) diff --git a/tools/mcp/deno.json b/tools/mcp/deno.json new file mode 100644 index 000000000..5b320c26e --- /dev/null +++ b/tools/mcp/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": { + "@std/assert": "jsr:@std/assert@1" + } +} diff --git a/tools/mcp/deno.lock b/tools/mcp/deno.lock new file mode 100644 index 000000000..28f4eb41c --- /dev/null +++ b/tools/mcp/deno.lock @@ -0,0 +1,23 @@ +{ + "version": "4", + "specifiers": { + "jsr:@std/assert@1": "1.0.12", + "jsr:@std/internal@^1.0.6": "1.0.6" + }, + "jsr": { + "@std/assert@1.0.12": { + "integrity": "08009f0926dda9cbd8bef3a35d3b6a4b964b0ab5c3e140a4e0351fbf34af5b9a", + "dependencies": [ + "jsr:@std/internal" + ] + }, + "@std/internal@1.0.6": { + "integrity": "9533b128f230f73bd209408bb07a4b12f8d4255ab2a4d22a1fd6d87304aca9a4" + } + }, + "workspace": { + "dependencies": [ + "jsr:@std/assert@1" + ] + } +} diff --git a/tools/mcp/main.ts b/tools/mcp/main.ts new file mode 100644 index 000000000..6b484d091 --- /dev/null +++ b/tools/mcp/main.ts @@ -0,0 +1,8 @@ +export function add(a: number, b: number): number { + return a + b +} + +// Learn more at https://docs.deno.com/runtime/manual/examples/module_metadata#concepts +if (import.meta.main) { + console.log('Add 2 + 3 =', add(2, 3)) +} diff --git a/tools/mcp/main_test.ts b/tools/mcp/main_test.ts new file mode 100644 index 000000000..146c6c94b --- /dev/null +++ b/tools/mcp/main_test.ts @@ -0,0 +1,6 @@ +import { assertEquals } from '@std/assert' +import { add } from './main.ts' + +Deno.test(function addTest() { + assertEquals(add(2, 3), 5) +}) diff --git a/tsconfig.json b/tsconfig.json index f3f535547..a5e464409 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -82,5 +82,5 @@ "shim.d.ts", "*.config.ts" ], - "exclude": ["node_modules"] + "exclude": ["node_modules", "tools/mcp"] }