chore: add vitepress
This commit is contained in:
parent
dd48dd8132
commit
90e2e2f7c0
|
|
@ -1,6 +1,6 @@
|
||||||
const process = require('node:process')
|
const process = require('node:process')
|
||||||
|
|
||||||
process.env.ESLINT_TSCONFIG = 'tsconfig.json'
|
// process.env.ESLINT_TSCONFIG = 'tsconfig.json'
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: '@antfu',
|
extends: '@antfu',
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -31,3 +31,5 @@ coverage
|
||||||
test-results/
|
test-results/
|
||||||
playwright-report/
|
playwright-report/
|
||||||
vite.config.ts.timestamp*
|
vite.config.ts.timestamp*
|
||||||
|
|
||||||
|
**/.vitepress/cache/*
|
||||||
16
apps/www/.vitepress/config.mts
Normal file
16
apps/www/.vitepress/config.mts
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import path from 'node:path'
|
||||||
|
import { defineConfig } from 'vitepress'
|
||||||
|
|
||||||
|
// https://vitepress.dev/reference/site-config
|
||||||
|
export default defineConfig({
|
||||||
|
title: 'shadcn-vue',
|
||||||
|
description: 'A VitePress Site',
|
||||||
|
srcDir: path.resolve(__dirname, '../src/content'),
|
||||||
|
vite: {
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, '../src/lib'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -6,6 +6,5 @@ export default {
|
||||||
Layout,
|
Layout,
|
||||||
enhanceApp({ app, router, siteData }) {
|
enhanceApp({ app, router, siteData }) {
|
||||||
// ...
|
// ...
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2,22 +2,13 @@
|
||||||
"name": "www",
|
"name": "www",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"require": "./dist/radix-vue.umd.js",
|
|
||||||
"import": "./dist/radix-vue.es.js"
|
|
||||||
},
|
|
||||||
"./dist/style.css": "./dist/style.css"
|
|
||||||
},
|
|
||||||
"main": "./dist/radix-vue.umd.js",
|
|
||||||
"module": "./dist/radix-vue.es.js",
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vitepress dev",
|
||||||
"build": "vue-tsc && vite build",
|
"build": "vitepress build",
|
||||||
"preview": "vite preview"
|
"preview": "vitepress preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@morev/vue-transitions": "^2.3.6",
|
"@morev/vue-transitions": "^2.3.6",
|
||||||
|
|
@ -28,6 +19,7 @@
|
||||||
"lucide-vue-next": "^0.268.0",
|
"lucide-vue-next": "^0.268.0",
|
||||||
"radix-vue": "^0.1.24",
|
"radix-vue": "^0.1.24",
|
||||||
"tailwindcss-animate": "^1.0.6",
|
"tailwindcss-animate": "^1.0.6",
|
||||||
|
"vitepress": "^1.0.0-rc.10",
|
||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import tailwindcssAnimate from 'tailwindcss-animate'
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
darkMode: ['class'],
|
darkMode: ['class'],
|
||||||
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx,md}', './vitepress/**/*.{vue,js,ts,jsx,tsx}'],
|
||||||
theme: {
|
theme: {
|
||||||
container: {
|
container: {
|
||||||
center: true,
|
center: true,
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,18 @@
|
||||||
{
|
{
|
||||||
|
"include": ["/**/*.vue", ".vitepress/**/*.vue", "/**/*.ts", ".vitepress/**/*.mts"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
"target": "esnext",
|
||||||
"useDefineForClassFields": true,
|
"module": "esnext",
|
||||||
"module": "ESNext",
|
"moduleResolution": "node",
|
||||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
"strict": true,
|
||||||
"skipLibCheck": true,
|
|
||||||
"allowJs": true,
|
|
||||||
|
|
||||||
/* Bundler mode */
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"allowImportingTsExtensions": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
|
"sourceMap": true,
|
||||||
/* Linting */
|
"resolveJsonModule": true,
|
||||||
"strict": false,
|
"esModuleInterop": true,
|
||||||
"noUnusedLocals": true,
|
"declaration": false,
|
||||||
"noUnusedParameters": true,
|
"lib": ["esnext", "dom"],
|
||||||
"noFallthroughCasesInSwitch": true,
|
"baseUrl": ".",
|
||||||
|
"skipLibCheck": true,
|
||||||
"baseUrl": "./",
|
"outDir": "dist"
|
||||||
"paths": {
|
}
|
||||||
"@/*": ["src/lib/*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/index.js"],
|
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"allowSyntheticDefaultImports": true
|
|
||||||
},
|
|
||||||
"include": ["vite.config.ts"]
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
import path from 'node:path'
|
|
||||||
import { defineConfig } from 'vite'
|
|
||||||
import vue from '@vitejs/plugin-vue'
|
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
|
||||||
export default defineConfig({
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: path.resolve(__dirname, 'src/index.js'),
|
|
||||||
name: 'radix-vue',
|
|
||||||
fileName: format => `${format}.js`,
|
|
||||||
},
|
|
||||||
rollupOptions: {
|
|
||||||
external: ['vue'],
|
|
||||||
output: {
|
|
||||||
globals: {
|
|
||||||
vue: 'Vue',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [vue(), vueJsx()],
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': path.resolve(__dirname, './src/lib'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
import { defineConfig } from 'vitepress'
|
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
|
||||||
export default defineConfig({
|
|
||||||
title: "shadcn-vue",
|
|
||||||
description: "A VitePress Site"
|
|
||||||
})
|
|
||||||
|
|
@ -11,10 +11,7 @@
|
||||||
"dev": "pnpm --filter www dev",
|
"dev": "pnpm --filter www dev",
|
||||||
"prepare": "pnpm simple-git-hooks",
|
"prepare": "pnpm simple-git-hooks",
|
||||||
"lint": "eslint . --ignore-path .gitignore",
|
"lint": "eslint . --ignore-path .gitignore",
|
||||||
"lint:fix": "eslint . --fix --ignore-path .gitignore",
|
"lint:fix": "eslint . --fix --ignore-path .gitignore"
|
||||||
"docs:dev": "vitepress dev docs",
|
|
||||||
"docs:build": "vitepress build docs",
|
|
||||||
"docs:preview": "vitepress preview docs"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.39.7",
|
"@antfu/eslint-config": "^0.39.7",
|
||||||
|
|
|
||||||
5229
pnpm-lock.yaml
5229
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,3 @@
|
||||||
packages:
|
packages:
|
||||||
- 'apps/*'
|
- 'apps/*'
|
||||||
- 'packages/*'
|
- 'packages/*'
|
||||||
- 'templates/*'
|
|
||||||
|
|
|
||||||
24
templates/nuxt-template/.gitignore
vendored
24
templates/nuxt-template/.gitignore
vendored
|
|
@ -1,24 +0,0 @@
|
||||||
# Nuxt dev/build outputs
|
|
||||||
.output
|
|
||||||
.data
|
|
||||||
.nuxt
|
|
||||||
.nitro
|
|
||||||
.cache
|
|
||||||
dist
|
|
||||||
|
|
||||||
# Node dependencies
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Misc
|
|
||||||
.DS_Store
|
|
||||||
.fleet
|
|
||||||
.idea
|
|
||||||
|
|
||||||
# Local env files
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
shamefully-hoist=true
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
# Nuxt 3 Minimal Starter
|
|
||||||
|
|
||||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
Make sure to install the dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Development Server
|
|
||||||
|
|
||||||
Start the development server on `http://localhost:3000`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm run dev
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn dev
|
|
||||||
```
|
|
||||||
|
|
||||||
## Production
|
|
||||||
|
|
||||||
Build the application for production:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm run build
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
Locally preview production build:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm run preview
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm run preview
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn preview
|
|
||||||
```
|
|
||||||
|
|
||||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<NuxtWelcome />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
||||||
export default defineNuxtConfig({
|
|
||||||
devtools: { enabled: true },
|
|
||||||
})
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"name": "nuxt-app",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"build": "nuxt build",
|
|
||||||
"dev": "nuxt dev",
|
|
||||||
"generate": "nuxt generate",
|
|
||||||
"preview": "nuxt preview",
|
|
||||||
"postinstall": "nuxt prepare"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@nuxt/devtools": "latest",
|
|
||||||
"nuxt": "^3.7.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "../.nuxt/tsconfig.server.json"
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
// https://nuxt.com/docs/guide/concepts/typescript
|
|
||||||
"extends": "./.nuxt/tsconfig.json"
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user