Skip to content

Commit

Permalink
minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Mar 2, 2024
1 parent 193bb69 commit bfaeb60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions website/utils/examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ function walkMenu(
export async function getProjectExamples(projectName: string) {
const postfix = "/src/code.tsx";

const examplesPath =
execSync("pnpm --filter @af-utils/examples exec pwd")
.toString()
.replace(/[\s]*$/, "") + "/src/";
const examplesPath = execSync("pnpm --filter @af-utils/examples exec pwd")
.toString()
.replace(/[\s]*$/, "/src/");

return glob
.sync(`${examplesPath}${projectName}/**${postfix}`)
Expand Down

0 comments on commit bfaeb60

Please sign in to comment.