Skip to content

Commit

Permalink
fix: set default node version to 18 in CodeSandbox (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeghbarati authored Nov 12, 2023
1 parent 31b7014 commit 3ea532a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/www/.vitepress/theme/utils/codeeditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { type Style } from '@/lib/registry/styles'
export function makeCodeSandboxParams(componentName: string, style: Style, sources: Record<string, string>) {
let files = {}
files = constructFiles(componentName, style, sources)
files['.codesandbox/Dockerfile'] = {
content: 'FROM node:18',
}
return getParameters({ files, template: 'node' })
}

Expand Down Expand Up @@ -121,7 +124,7 @@ function constructFiles(componentName: string, style: Style, sources: Record<str
'package.json': {
content: {
name: `shadcn-vue-${componentName.toLowerCase().replace(/ /g, '-')}`,
scripts: { start: `shadcn-vue add ${registryDependencies.join(' ')} -y && vite` },
scripts: { start: `shadcn-vue add ${registryDependencies.join(' ')} -y && vite` },
dependencies,
devDependencies,
},
Expand Down

0 comments on commit 3ea532a

Please sign in to comment.