Skip to content

Commit

Permalink
docs: fix component preview alias path (#150)
Browse files Browse the repository at this point in the history
* chore: update deps

* docs: fix alias path
  • Loading branch information
sadeghbarati authored Nov 4, 2023
1 parent 8332ab6 commit 3e74fe7
Show file tree
Hide file tree
Showing 5 changed files with 276 additions and 241 deletions.
8 changes: 7 additions & 1 deletion apps/www/.vitepress/theme/plugins/previewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ export default function (md: MarkdownRenderer) {
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, {
attrs,
props,
code: fs.readFileSync(srcPath, 'utf-8'),
code,
path: srcPath,
})

Expand Down
18 changes: 9 additions & 9 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@radix-icons/vue": "^1.0.0",
"@stackblitz/sdk": "^1.9.0",
"@tanstack/vue-table": "^8.10.7",
"@unovis/ts": "^1.2.2",
"@unovis/ts": "^1.2.3",
"@unovis/vue": "1.3.0-beta.3",
"@vee-validate/zod": "^4.11.8",
"@vueuse/core": "^10.5.0",
Expand All @@ -26,11 +26,11 @@
"codesandbox": "^2.2.3",
"date-fns": "^2.30.0",
"lucide-vue-next": "^0.276.0",
"radix-vue": "^1.1.0",
"radix-vue": "^1.1.1",
"tailwindcss-animate": "^1.0.7",
"v-calendar": "^3.1.2",
"vee-validate": "4.11.8",
"vue": "^3.3.6",
"vue": "^3.3.7",
"vue-wrap-balancer": "^1.1.3",
"zod": "^3.22.4"
},
Expand All @@ -40,22 +40,22 @@
"@iconify/json": "^2.2.108",
"@iconify/vue": "^4.1.1",
"@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-jsx": "^3.0.2",
"@vue/compiler-core": "^3.3.7",
"@vue/compiler-dom": "^3.3.7",
"autoprefixer": "^10.4.16",
"lodash.template": "^4.5.0",
"radix-vue": "^1.1.0",
"radix-vue": "^1.1.1",
"rimraf": "^5.0.5",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"unplugin-icons": "^0.17.1",
"vite": "^4.5.0",
"vitepress": "^1.0.0-rc.23",
"vue-tsc": "^1.8.20"
"vitepress": "^1.0.0-rc.24",
"vue-tsc": "^1.8.22"
}
}
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/components-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Import alias for your components.
```json title="components.json"
{
"aliases": {
"components": "@/lib/components"
"components": "@/components"
}
}
```
```
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "shadcn-vue",
"version": "0.8.0",
"private": true,
"packageManager": "pnpm@8.9.2",
"packageManager": "pnpm@8.10.2",
"license": "MIT",
"repository": "radix-vue/shadcn-vue",
"workspaces": [
Expand All @@ -25,18 +25,16 @@
"taze": "taze major -frI --ignore-paths ./packages/cli/test/** --exclude typescript,/@iconify/",
"taze:minor": "taze minor -fwri --ignore-paths ./packages/cli/test/** --exclude /@iconify/"
},
"dependencies": {
"bumpp": "^9.2.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.43.1",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"bumpp": "^9.2.0",
"eslint": "^8.52.0",
"lint-staged": "^14.0.1",
"pnpm": "^8.9.2",
"pnpm": "^8.10.2",
"simple-git-hooks": "^2.9.0",
"taze": "^0.11.4",
"taze": "^0.12.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand Down
Loading

0 comments on commit 3e74fe7

Please sign in to comment.