Skip to content

Commit

Permalink
Add .gitignore to examples that lack them (#28003)
Browse files Browse the repository at this point in the history
* Only copy .gitignores to examples that are actual packages.

`custom-server` is just a `.md` redirecting users to the documentation.

* Add .gitignores to examples that lack them
  • Loading branch information
oBusk committed Aug 12, 2021
1 parent 1302067 commit 6403a99
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 1 deletion.
34 changes: 34 additions & 0 deletions examples/with-clerk/.gitignore
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
34 changes: 34 additions & 0 deletions examples/with-deta-base/.gitignore
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
34 changes: 34 additions & 0 deletions examples/with-mqtt-js/.gitignore
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
2 changes: 1 addition & 1 deletion scripts/check-examples.sh
@@ -1,8 +1,8 @@
#!/bin/bash

for folder in examples/* ; do
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
if [ -f "$folder/package.json" ]; then
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
cat $folder/package.json | jq '.license = "MIT" | .private = true' | sponge $folder/package.json
fi
if [ -f "$folder/tsconfig.json" ]; then
Expand Down

0 comments on commit 6403a99

Please sign in to comment.