-
Notifications
You must be signed in to change notification settings - Fork 12
feat: setup cli project #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c87c9e0
4e59ef7
2fec290
0aad39d
0e3b1ba
023bea3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# @sveltejs/mcp | ||
|
||
The CLI version of the Svelte MCP. | ||
|
||
You can run it directly with | ||
|
||
```bash | ||
npx @sveltejs/mcp | ||
``` | ||
|
||
or install it and then run it | ||
|
||
```bash | ||
pnpm i @sveltejs/mcp | ||
pnpm svelte-mcp | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@sveltejs/mcp", | ||
"version": "0.0.1", | ||
"type": "module", | ||
"license": "MIT", | ||
"homepage": "https://github.com/sveltejs/mcp#readme", | ||
"bugs": { | ||
"url": "https://github.com/sveltejs/mcp/issues" | ||
}, | ||
"bin": { | ||
"svelte-mcp": "./dist/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sveltejs/mcp.git" | ||
}, | ||
"author": "Author Name <[email protected]>", | ||
|
||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/index.js", | ||
|
||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"build": "tsdown", | ||
"dev": "tsdown --watch", | ||
"test": "vitest", | ||
"check": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/mcp-server": "workspace:^", | ||
"@tmcp/transport-stdio": "^0.3.0", | ||
"@types/node": "^22.15.17", | ||
"publint": "^0.3.13", | ||
"tsdown": "^0.11.9", | ||
"typescript": "^5.8.3", | ||
"vitest": "^3.1.3" | ||
}, | ||
"dependencies": { | ||
"eslint": "^9.36.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /usr/bin/env node | ||
import { server } from '@sveltejs/mcp-server'; | ||
import { StdioTransport } from '@tmcp/transport-stdio'; | ||
|
||
const transport = new StdioTransport(server); | ||
|
||
transport.listen(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["src"], | ||
"exclude": ["node_modules", "dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { defineConfig } from 'tsdown'; | ||
|
||
export default defineConfig([ | ||
{ | ||
entry: ['./src/index.ts'], | ||
platform: 'node', | ||
define: { | ||
// some eslint-plugin-svelte code expects __filename to exists but in an ESM environment it does not. | ||
__filename: '""', | ||
|
||
}, | ||
// we need eslint at runtime but the bundler doesn't bundle `require`'s which `eslint-plugin-svelte` uses to require | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where does eslint-plugin-svelte come from? i don't see it in dependencies There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a dependency of |
||
// `eslint/use-at-your-own-risk`. If we didn't have `eslint` as an actual dependency and didn't externalize it | ||
// the require would fail once executed in a project without eslint installed. | ||
external: ['eslint'], | ||
publint: true, | ||
dts: false, | ||
treeshake: true, | ||
clean: true, | ||
target: 'esnext', | ||
}, | ||
]); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({}); |
Uh oh!
There was an error while loading. Please reload this page.