Skip to content

Commit

Permalink
fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
juliencrn committed Jun 6, 2023
1 parent 79812af commit fc07bba
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 60 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ pnpm dev --filter=usehooks-ts # jest --watch
pnpm dev --filter=www # next dev

# Develop
pnpm build
pnpm lint
pnpm types-check
pnpm test
pnpm build
```

### How is structured a hook ?
Expand Down
10 changes: 5 additions & 5 deletions apps/www/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
# testing
/coverage

# next.js
# generated
/.next/
/out/

# production
/build
generated
public/sitemap.xml
public/robots.txt

# misc
.DS_Store
Expand All @@ -34,5 +35,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

.contentlayer
generated

2 changes: 1 addition & 1 deletion apps/www/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { z } from 'zod'
export const env = createEnv({
server: {},
client: {
NEXT_PUBLIC_GA_MEASUREMENT_ID: z.string(),
NEXT_PUBLIC_GA_MEASUREMENT_ID: z.string().optional().default(''),
},
runtimeEnv: {
NEXT_PUBLIC_GA_MEASUREMENT_ID: process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID,
Expand Down
4 changes: 2 additions & 2 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"tailwind-merge": "^1.12.0",
"tailwindcss": "3.3.2",
"tailwindcss-animate": "^1.0.5",
"usehooks-ts": "*",
"usehooks-ts": "workspace:*",
"zod": "^3.21.4"
},
"devDependencies": {
Expand All @@ -44,7 +44,7 @@
"@types/react-dom": "18.2.4",
"autoprefixer": "10.4.14",
"eslint": "8.41.0",
"eslint-config-custom": "*",
"eslint-config-custom": "workspace:*",
"eslint-config-next": "13.4.4",
"next-sitemap": "^4.0.7",
"postcss": "8.4.24",
Expand Down
9 changes: 0 additions & 9 deletions apps/www/public/robots.txt

This file was deleted.

41 changes: 0 additions & 41 deletions apps/www/public/sitemap.xml

This file was deleted.

5 changes: 5 additions & 0 deletions apps/www/src/components/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import Script from 'next/script'

export function Analytics() {
const GA_MEASUREMENT_ID = process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID

if (!GA_MEASUREMENT_ID) {
return null
}

return (
<>
<Script
Expand Down
2 changes: 1 addition & 1 deletion packages/usehooks-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@typescript-eslint/parser": "^5.37.0",
"date-fns": "^2.29.3",
"eslint": "^8.9.0",
"eslint-config-custom": "*",
"eslint-config-custom": "workspace:*",
"eslint-plugin-tree-shaking": "^1.10.0",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
Expand Down

0 comments on commit fc07bba

Please sign in to comment.