2020-08-30 04:32:35 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
for folder in examples/* ; do
|
|
|
|
if [ -f "$folder/package.json" ]; then
|
2021-08-12 23:47:14 +02:00
|
|
|
cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore;
|
2021-08-14 17:48:39 +02:00
|
|
|
cat $folder/package.json | jq 'del(.license) | .private = true' | sponge $folder/package.json
|
2020-08-30 04:32:35 +02:00
|
|
|
fi
|
2021-08-12 22:36:53 +02:00
|
|
|
if [ -f "$folder/tsconfig.json" ]; then
|
|
|
|
cp packages/create-next-app/templates/typescript/next-env.d.ts $folder/next-env.d.ts
|
|
|
|
fi
|
2020-08-30 04:32:35 +02:00
|
|
|
done;
|
|
|
|
|
|
|
|
if [[ ! -z $(git status -s) ]];then
|
|
|
|
echo "Detected changes"
|
|
|
|
git status
|
|
|
|
exit 1
|
|
|
|
fi
|