Skip to content

Commit 2d5c46d

Browse files
committed
feat: add client-js template with config files and scripts
1 parent 9384c4c commit 2d5c46d

25 files changed

+812
-1
lines changed

.changeset/clean-candies-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-mcp-kit': patch
3+
---
4+
5+
feat: add client-js template

packages/create-mcp-kit/template/client-js/.env.hbs

Whitespace-only changes.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
.DS_Store
2+
.idea/
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
lerna-debug.log*
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
#.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
/docs/.vitepress/cache/
109+
110+
stats.html
111+
112+
build/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{#if (includes plugins 'style')}}
2+
{
3+
"tabWidth": 2,
4+
"printWidth": 120,
5+
"useTabs": false,
6+
"semi": false,
7+
"singleQuote": true,
8+
"trailingComma": "all",
9+
"bracketSpacing": true,
10+
"jsxBracketSameLine": false,
11+
"arrowParens": "avoid"
12+
}
13+
{{/if}}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) {{year}} {{projectName}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{{#if (includes plugins 'github-action')}}
2+
name: build
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
if: github.repository == '{{projectName}}'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
cache: npm
24+
25+
- name: Install Package
26+
run: npm i
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Build Package
32+
run: npm run build
33+
34+
- name: Test Package
35+
run: npm run coverage
36+
37+
- name: Coveralls
38+
uses: coverallsapp/github-action@v2
39+
{{/if}}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{#if (includes plugins 'github-action')}}
2+
name: npm-publish
3+
4+
on:
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
build:
10+
if: github.repository == '{{projectName}}'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
registry-url: https://registry.npmjs.org/
26+
cache: npm
27+
28+
- name: Install Package
29+
run: npm i
30+
31+
- name: Lint
32+
run: npm run lint
33+
34+
- name: Build Package
35+
run: npm run build
36+
37+
- name: Publish NPM Package
38+
run: npm publish --provenance --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
41+
{{/if}}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{#if (includes plugins 'commitlint')}}
2+
npx --no-install commitlint --edit $1
3+
{{/if}}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{#if (includes plugins 'style')}}
2+
npx lint-staged
3+
{{/if}}

0 commit comments

Comments
 (0)