Skip to content

Commit

Permalink
examples: check-examples.sh considers src/app as Pages Router (ve…
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi authored Nov 5, 2024
1 parent cf8273b commit 570ed96
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 4 deletions.
40 changes: 40 additions & 0 deletions examples/api-routes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for commiting if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
2 changes: 1 addition & 1 deletion examples/blog-starter/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion examples/cms-wordpress/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion examples/with-zustand/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion scripts/check-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for folder in examples/* ; do
' | sponge $folder/package.json
fi
if [ -f "$folder/tsconfig.json" ]; then
if [ -d "$folder/app" ]; then
if [ -d "$folder/app" ] || [ -d "$folder/src/app" ]; then
cp packages/create-next-app/templates/app/ts/next-env.d.ts $folder/next-env.d.ts
else
cp packages/create-next-app/templates/default/ts/next-env.d.ts $folder/next-env.d.ts
Expand Down

0 comments on commit 570ed96

Please sign in to comment.