Skip to content

Commit

Permalink
chore: update default
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Nov 4, 2023
1 parent 688df2e commit 71187ce
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apps/website/src/data/blocks/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ function getComponentCode(componentFolder: string, componentName: string) {
}

const getRootFolder = () => {
return (
process.env.TEMPLATE_ROOT ||
path.join(
process.env.PROJECT_CWD ?? __dirname + '/../../../../',
'/packages/pro/saas-ui/templates/src'
)
return path.join(
process.env.PROJECT_CWD ?? __dirname + '/../../../../',
'/packages/pro/saas-ui/templates/src'
)
}

Expand Down Expand Up @@ -112,7 +109,7 @@ export function getAllComponents(): ComponentInfo[] {
export function getComponent(
categoryName: string,
componentName: string,
rootFolder = getRootFolder()
rootFolder = process.env.TEMPLATE_ROOT || getRootFolder()
): ComponentInfo | null {
console.log('rootFolder', rootFolder)
const componentDirectory = path.join(rootFolder, categoryName, componentName)
Expand Down

0 comments on commit 71187ce

Please sign in to comment.