Skip to content

Commit

Permalink
build(www): fix build using turbo/npm-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
juliencrn committed Jun 6, 2023
1 parent c0c2f2b commit cfaed4f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
5 changes: 3 additions & 2 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && pnpm generate-sitemap",
"build": "pnpm generate && next build && pnpm generate-sitemap",
"generate-sitemap": "rimraf public/sitemap.xml public/robots.txt && next-sitemap --config ./next-sitemap.config.mjs",
"start": "next start",
"lint": "next lint",
"clean": "rimraf .next generated .turbo"
"clean": "rimraf .next generated .turbo",
"generate": "cd ../.. && pnpm copy-hooks && cd -"
},
"dependencies": {
"@mdx-js/loader": "^2.3.0",
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/components/remote-mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ const components = {
{...props}
/>
),
img: ({ className, alt, ...props }: ComponentProps<'img'>) => (
<img className={cn('rounded-md border', className)} alt={alt} {...props} />
),
// img: ({ className, alt, ...props }: ComponentProps<'img'>) => (
// <img className={cn('rounded-md border', className)} alt={alt} {...props} />
// ),
hr: ({ ...props }: ComponentProps<'hr'>) => (
<hr className="my-4 md:my-8" {...props} />
),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"license": "MIT",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "pnpm copy-hooks && turbo run dev",
"build": "pnpm copy-hooks && turbo run build",
"dev": "turbo run dev",
"build": "turbo run build",
"test": "turbo run test",
"clean": "turbo run clean",
"format": "prettier --write \"**/*.{json,md,mdx,css,scss,yaml,yml}\"",
Expand Down
11 changes: 2 additions & 9 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist"]
},
"www#build": {
"dependsOn": ["^build", "copy-hooks"],
"env": ["NEXT_PUBLIC_GA_MEASUREMENT_ID"],
"outputs": [".next/**", "!.next/cache/**"]
"outputs": ["dist", ".next/**", "!.next/cache/**"]
},
"lint": {
"outputs": [],
Expand All @@ -30,9 +25,7 @@
"clean": {
"outputs": [],
"cache": false
},
"copy-hooks": {},
"update-readme": {}
}
},
"globalDependencies": ["tsconfig.json"]
}

0 comments on commit cfaed4f

Please sign in to comment.