github工作流
Some checks failed
Publish Any Commit / publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / generate (macos-latest) (push) Has been cancelled
CI / generate (ubuntu-latest) (push) Has been cancelled
CI / generate (windows-latest) (push) Has been cancelled

This commit is contained in:
2025-07-29 00:25:14 +08:00
parent 0664ca9601
commit 7d2f57df97
6 changed files with 299 additions and 0 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
ko_fi: ztl_uwu

48
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [🐞 bug]
title: 'bug: '
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
This form is only for submitting bug reports. If you have a usage question
or are unsure if this is really a bug, make sure to:
- Read the [docs](https://shadcn-docs-nuxt.vercel.app/)
- Ask on [GitHub Discussions](https://github.com/ZTL-UwU/shadcn-docs-nuxt/discussions)
- type: textarea
id: bug-env
attributes:
label: Environment
description: Output of `npx envinfo --system --npmPackages vue,@vueuse/core,shadcn-docs-nuxt,reka-ui,nuxt,shadcn-vue,shadcn-nuxt --binaries --browsers`
placeholder: Environment
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: A link to a repo that can reproduce the problem you ran into.
placeholder: Reproduction
- type: textarea
id: additional
attributes:
label: Additional context
description: If applicable, add any other context about the problem here
- type: textarea
id: logs
attributes:
label: Logs
description: |
Optional if provided reproduction. Please try not to insert an image but copy paste the log text.
render: shell-script

View File

@@ -0,0 +1,20 @@
name: 🚀 Feature request
description: Suggest a feature that will improve shadcn-docs-nuxt
labels: [✨ feature]
title: 'feat: '
body:
- type: textarea
id: feature-description
attributes:
label: Describe the feature
description: A clear and concise description of what you think would be a helpful addition to shadcn-docs-nuxt, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link.
placeholder: Feature description
validations:
required: true
- type: checkboxes
id: additional-info
attributes:
label: Additional information
description: Additional information that helps us decide how to proceed.
options:
- label: Would you be willing to help implement this feature?

104
.github/nuxt.config.ts vendored Normal file
View File

@@ -0,0 +1,104 @@
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import tailwindcss from '@tailwindcss/vite';
const currentDir = dirname(fileURLToPath(import.meta.url));
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'shadcn-nuxt',
'@vueuse/nuxt',
'@ztl-uwu/nuxt-content',
'@nuxt/image',
'@nuxt/icon',
'@nuxtjs/color-mode',
'nuxt-og-image',
'@nuxt/scripts',
'@nuxtjs/i18n',
'@nuxt/fonts',
],
shadcn: {
prefix: 'Ui',
componentDir: join(currentDir, './components/ui'),
},
components: {
dirs: [
{
path: './components',
ignore: ['**/*.ts'],
},
],
},
i18n: {
bundle: {
optimizeTranslationDirective: false,
},
strategy: 'prefix_except_default',
},
colorMode: {
classSuffix: '',
disableTransition: true,
},
css: [
join(currentDir, './assets/css/themes.css'),
'~/assets/css/tailwind.css',
],
content: {
documentDriven: true,
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark',
},
preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'mdc', 'yaml', 'bash', 'ini', 'dotenv'],
},
navigation: {
fields: [
'icon',
'navBadges',
'navTruncate',
'badges',
'toc',
'sidebar',
'collapse',
'editLink',
'prevNext',
'breadcrumb',
'fullpage',
],
},
experimental: {
search: {
indexed: true,
},
},
},
icon: {
clientBundle: {
scan: true,
sizeLimitKb: 512,
},
},
fonts: {
defaults: {
weights: ['300 800'],
},
},
typescript: {
tsConfig: {
compilerOptions: {
baseUrl: '.',
},
},
},
vite: {
plugins: [
tailwindcss(),
],
optimizeDeps: {
include: ['debug'],
},
},
compatibilityDate: '2025-05-13',
});

103
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,103 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm run typecheck
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
generate:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate
run: pnpm run generate

23
.github/workflows/pkg.pr.new.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Publish Any Commit
on: [push, pull_request]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpx pkg-pr-new publish