docs: fix component preview alias path (#150)

* chore: update deps

* docs: fix alias path
This commit is contained in:
Sadegh Barati 2023-11-04 16:37:41 +03:30 committed by GitHub
parent 8332ab6022
commit 3e74fe7de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 276 additions and 241 deletions

View File

@ -24,10 +24,16 @@ export default function (md: MarkdownRenderer) {
return defaultRender!(tokens, idx, options, env, self) return defaultRender!(tokens, idx, options, env, self)
} }
let code = fs.readFileSync(srcPath, 'utf-8')
code = code.replaceAll(
'@/lib/registry/default/',
'@/components/',
)
const demoScripts = generateDemoComponent(md, env, { const demoScripts = generateDemoComponent(md, env, {
attrs, attrs,
props, props,
code: fs.readFileSync(srcPath, 'utf-8'), code,
path: srcPath, path: srcPath,
}) })

View File

@ -17,7 +17,7 @@
"@radix-icons/vue": "^1.0.0", "@radix-icons/vue": "^1.0.0",
"@stackblitz/sdk": "^1.9.0", "@stackblitz/sdk": "^1.9.0",
"@tanstack/vue-table": "^8.10.7", "@tanstack/vue-table": "^8.10.7",
"@unovis/ts": "^1.2.2", "@unovis/ts": "^1.2.3",
"@unovis/vue": "1.3.0-beta.3", "@unovis/vue": "1.3.0-beta.3",
"@vee-validate/zod": "^4.11.8", "@vee-validate/zod": "^4.11.8",
"@vueuse/core": "^10.5.0", "@vueuse/core": "^10.5.0",
@ -26,11 +26,11 @@
"codesandbox": "^2.2.3", "codesandbox": "^2.2.3",
"date-fns": "^2.30.0", "date-fns": "^2.30.0",
"lucide-vue-next": "^0.276.0", "lucide-vue-next": "^0.276.0",
"radix-vue": "^1.1.0", "radix-vue": "^1.1.1",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"v-calendar": "^3.1.2", "v-calendar": "^3.1.2",
"vee-validate": "4.11.8", "vee-validate": "4.11.8",
"vue": "^3.3.6", "vue": "^3.3.7",
"vue-wrap-balancer": "^1.1.3", "vue-wrap-balancer": "^1.1.3",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
@ -40,22 +40,22 @@
"@iconify/json": "^2.2.108", "@iconify/json": "^2.2.108",
"@iconify/vue": "^4.1.1", "@iconify/vue": "^4.1.1",
"@types/lodash.template": "^4.5.2", "@types/lodash.template": "^4.5.2",
"@types/node": "^20.8.7", "@types/node": "^20.8.10",
"@vitejs/plugin-vue": "^4.4.0", "@vitejs/plugin-vue": "^4.4.0",
"@vitejs/plugin-vue-jsx": "^3.0.2", "@vitejs/plugin-vue-jsx": "^3.0.2",
"@vue/compiler-core": "^3.3.7", "@vue/compiler-core": "^3.3.7",
"@vue/compiler-dom": "^3.3.7", "@vue/compiler-dom": "^3.3.7",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"lodash.template": "^4.5.0", "lodash.template": "^4.5.0",
"radix-vue": "^1.1.0", "radix-vue": "^1.1.1",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"tailwind-merge": "^1.14.0", "tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.3", "tailwindcss": "^3.3.5",
"tsx": "^3.14.0", "tsx": "^3.14.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"unplugin-icons": "^0.17.1", "unplugin-icons": "^0.17.1",
"vite": "^4.5.0", "vite": "^4.5.0",
"vitepress": "^1.0.0-rc.23", "vitepress": "^1.0.0-rc.24",
"vue-tsc": "^1.8.20" "vue-tsc": "^1.8.22"
} }
} }

View File

@ -146,7 +146,7 @@ Import alias for your components.
```json title="components.json" ```json title="components.json"
{ {
"aliases": { "aliases": {
"components": "@/lib/components" "components": "@/components"
} }
} }
``` ```

View File

@ -2,7 +2,7 @@
"name": "shadcn-vue", "name": "shadcn-vue",
"version": "0.8.0", "version": "0.8.0",
"private": true, "private": true,
"packageManager": "pnpm@8.9.2", "packageManager": "pnpm@8.10.2",
"license": "MIT", "license": "MIT",
"repository": "radix-vue/shadcn-vue", "repository": "radix-vue/shadcn-vue",
"workspaces": [ "workspaces": [
@ -25,18 +25,16 @@
"taze": "taze major -frI --ignore-paths ./packages/cli/test/** --exclude typescript,/@iconify/", "taze": "taze major -frI --ignore-paths ./packages/cli/test/** --exclude typescript,/@iconify/",
"taze:minor": "taze minor -fwri --ignore-paths ./packages/cli/test/** --exclude /@iconify/" "taze:minor": "taze minor -fwri --ignore-paths ./packages/cli/test/** --exclude /@iconify/"
}, },
"dependencies": {
"bumpp": "^9.2.0"
},
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^0.43.1", "@antfu/eslint-config": "^0.43.1",
"@commitlint/cli": "^17.7.1", "@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0", "@commitlint/config-conventional": "^17.7.0",
"bumpp": "^9.2.0",
"eslint": "^8.52.0", "eslint": "^8.52.0",
"lint-staged": "^14.0.1", "lint-staged": "^14.0.1",
"pnpm": "^8.9.2", "pnpm": "^8.10.2",
"simple-git-hooks": "^2.9.0", "simple-git-hooks": "^2.9.0",
"taze": "^0.11.4", "taze": "^0.12.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vitest": "^0.34.6" "vitest": "^0.34.6"
}, },

File diff suppressed because it is too large Load Diff