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
92 changes: 3 additions & 89 deletions .vitepress/theme/components/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
import {
VipBackTop,
VipContactAuthor,
VipOpenSource,
VipProjectTable,
VipTeam,
} from '@142vip/vitepress/components'
import { useData } from 'vitepress'
import { onMounted, ref } from 'vue'
import { getCoreProjectData, getExampleDemoTableData } from '../../sidebar'

const { isDark } = useData()
const coreProjectTableData = ref<any[]>([])
const exampleDemoTableData = ref()

Expand All @@ -31,96 +30,11 @@ onMounted(async () => {

<VipTeam />

<section id="sponsors">
<h2>赞赏列表</h2>
<blockquote>
排名不分先后, <strong>赞赏过的一定要微信跟我说呀!!!!!!</strong>
</blockquote>
<div>
<a href="https://github.com/ChiefPing" target="_blank">
<img
alt="ChiefPing"
class="image-border"
src="https://avatars2.githubusercontent.com/u/34122068?s=460&v=4"
title="ChiefPing"
>
</a>
<a href="https://github.com/xiaoliuxin" target="_blank">
<img
alt="xiaoliuxin"
class="image-border"
src="https://avatars2.githubusercontent.com/u/60652527?s=460&v=4"
title="xiaoliuxin"
>
</a>
</div>
<h2>赞助商</h2>
<blockquote>
以下排名不分先后! 还木有收到赞助,哈哈哈,先留坑
</blockquote>
</section>

<section id="contributions">
<h2>贡献</h2>

<blockquote>
感谢所有参与仓库建设的开发者
</blockquote>

<a href="https://github.com/142vip/core-x/graphs/contributors">
<img
alt="感谢向仓库提交PR的所有开发者"
src="https://contrib.rocks/image?repo=142vip/core-x"
title="@142vip/core-x"
>
</a>
</section>

<section id="trending">
<h2>趋势</h2>
<!-- 支持黑色主题 -->
<div class="star-history">
<img
:src="`https://api.star-history.com/svg?repos=142vip/core-x,142vip/408CSFamily,142vip/JavaScriptCollection&type=Date${
isDark ? '&theme=dark' : ''
}`"
class="img-border"
alt="Github Star History"
title="Github Star History"
>
</div>
</section>
<!-- 开源项目 -->
<VipOpenSource />

<section id="contact-author">
<VipContactAuthor />
</section>
<VipBackTop />
</template>

<style scoped>
#trending {
.img-border {
border-radius: 5px;
}
}

#sponsors {
div {
display: flex;
justify-content: left;
}
.image-border {
border-radius: 5px;
width: 50px;
}
a {
margin: 5px;
}
}

.star-history {
display: flex;
justify-content: center;
align-content: center;
}
</style>
8 changes: 8 additions & 0 deletions apps/nest-demo/nest-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}
28 changes: 28 additions & 0 deletions apps/nest-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,33 @@
"email": "fairy_vip@2925.com",
"url": "https://github.com/142vip",
"homePage": "https://142vip.cn"
},
"scripts": {
"dev": "nest start --watch",
"dev:debug": "nest start --debug --watch",
"dev:prod": "node dist/main",
"build": "nest build",
"start": "nest start"
},
"dependencies": {
"@nestjs/common": "11.1.6",
"@nestjs/core": "11.1.6",
"@nestjs/platform-express": "11.1.6",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.1"
},
"devDependencies": {
"@nestjs/cli": "11.0.0",
"@nestjs/schematics": "11.0.0",
"@nestjs/testing": "11.1.6",
"@types/express": "5.0.0",
"@types/jest": "30.0.0",
"@types/supertest": "6.0.2",
"source-map-support": "0.5.21",
"supertest": "7.0.0",
"ts-jest": "29.2.5",
"ts-loader": "9.5.2",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0"
}
}
14 changes: 14 additions & 0 deletions apps/nest-demo/src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { AppService } from './app.service'
import { Controller, Get } from '@nestjs/common'

@Controller()
export class AppController {
constructor(
private readonly appService: AppService,
) {}

@Get()
public getHello(): string {
return this.appService.getHello()
}
}
9 changes: 9 additions & 0 deletions apps/nest-demo/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common'
import { AppController } from './app.controller'
import { AppService } from './app.service'

@Module({
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
8 changes: 8 additions & 0 deletions apps/nest-demo/src/app.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common'

@Injectable()
export class AppService {
getHello(): string {
return 'Hello World!'
}
}
9 changes: 9 additions & 0 deletions apps/nest-demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'

async function bootstrap(): Promise<void> {
const app = await NestFactory.create(AppModule)
await app.listen(3000)
}

void bootstrap()
31 changes: 31 additions & 0 deletions apps/nest-demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"compilerOptions": {
"incremental": true,
"target": "ES2023",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"baseUrl": "./",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolvePackageJsonExports": true,
"strictBindCallApply": false,
"strictNullChecks": true,
"noFallthroughCasesInSwitch": false,
"noImplicitAny": false,
"declaration": true,
"outDir": "./dist",
"removeComments": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"exclude": [
"node_modules",
"../src/test",
"dist",
"**/*spec.ts"
]
}
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export default defineVipEslintConfig({
rules: {
// 用于在模块构建后基于dist导出时找不到文件,忽略校验
'antfu/no-import-dist': 0,
// Nest.js的依赖注入会被识别为type-imports,自动fix会在import添加type,导致注入失败,此项必须关闭。
'ts/consistent-type-imports': ['off'],
},
settings: {
node: {
Expand Down
8 changes: 8 additions & 0 deletions packages/vitepress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## v0.0.1-alpha.19 (2025-10-21)

### ✨ Features

- 新增`VipOpenSource`组件,支持自定义开源仓库 &nbsp;-&nbsp; by **142vip.cn** in https://github.com/142vip/core-x/issues/712 [<samp>(0eec7)</samp>](https://github.com/142vip/core-x/commit/0eec7ad)

**Release New Version v0.0.1-alpha.19 [👉 View New Package On NPM](https://www.npmjs.com/package/@142vip/vitepress)**

## v0.0.1-alpha.18 (2025-10-17)

### ✨ Features
Expand Down
2 changes: 1 addition & 1 deletion packages/vitepress/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@142vip/vitepress",
"type": "module",
"version": "0.0.1-alpha.18",
"version": "0.0.1-alpha.19",
"private": false,
"description": "基于vitepress框架搭建静态站点的常用工具包,提供ElementPlus相关组件和主题",
"author": "mmdapl <mmdapl@163.com>",
Expand Down
109 changes: 109 additions & 0 deletions packages/vitepress/src/components/VipOpenSource.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<script lang="ts" setup>
import { useData } from 'vitepress'

// 组件属性
defineProps<{
repoNames?: string[]
}>()

const { isDark } = useData()

const repoDefaultNames = ['142vip/core-x', '142vip/408CSFamily', '142vip/JavaScriptCollection']

/**
* 获取指定仓库的star-history信息
* @param repoNames
*/
function getStarHistoryUrl(repoNames?: string[], dark: boolean) {
return `https://api.star-history.com/svg?repos=${(repoNames ?? repoDefaultNames).join(',')}&type=Date${dark ? '&theme=dark' : ''}`
}
</script>

<!-- 首页 -->
<template>
<section id="sponsors">
<h2>赞赏列表</h2>
<blockquote>
排名不分先后, <strong>赞赏过的一定要微信跟我说呀!!!!!!</strong>
</blockquote>
<div>
<a href="https://github.com/ChiefPing" target="_blank">
<img
alt="ChiefPing"
class="image-border"
src="https://avatars2.githubusercontent.com/u/34122068?s=460&v=4"
title="ChiefPing"
>
</a>
<a href="https://github.com/xiaoliuxin" target="_blank">
<img
alt="xiaoliuxin"
class="image-border"
src="https://avatars2.githubusercontent.com/u/60652527?s=460&v=4"
title="xiaoliuxin"
>
</a>
</div>
<h2>赞助商</h2>
<blockquote>
以下排名不分先后! 还木有收到赞助,哈哈哈,先留坑
</blockquote>
</section>

<section id="contributions">
<h2>贡献</h2>

<blockquote>
感谢所有参与仓库建设的开发者
</blockquote>

<a href="https://github.com/142vip/core-x/graphs/contributors">
<img
alt="感谢向仓库提交PR的所有开发者"
src="https://contrib.rocks/image?repo=142vip/core-x"
title="@142vip/core-x"
>
</a>
</section>

<section id="trending">
<h2>趋势</h2>
<!-- 支持黑色主题 -->
<div class="star-history">
<img
:src="getStarHistoryUrl(repoNames, isDark)"
alt="Github Star History"
class="img-border"
title="Github Star History"
>
</div>
</section>
</template>

<style scoped>
#trending {
.img-border {
border-radius: 5px;
}
}

#sponsors {
div {
display: flex;
justify-content: left;
}
.image-border {
border-radius: 5px;
width: 50px;
}
a {
margin: 5px;
}
}

.star-history {
display: flex;
justify-content: center;
align-content: center;
}
</style>
2 changes: 2 additions & 0 deletions packages/vitepress/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import VipBackTop from './VipBackTop.vue'
import VipContactAuthor from './VipContactAuthor.vue'
import VipOpenSource from './VipOpenSource.vue'
import VipProjectTable from './VipProjectTable.vue'
import VipTeam from './VipTeam.vue'

export {
VipBackTop,
VipContactAuthor,
VipOpenSource,
VipProjectTable,
VipTeam,
}
Loading
Loading