Unverified 提交 7938b69e authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Exclude .next & include .gitignore (#757)

上级 a6e0ea2f
...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="file1.txt"> <dyad-file path="file1.txt">
......
...@@ -149,7 +149,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -149,7 +149,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="file1.txt"> <dyad-file path="file1.txt">
......
...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="file1.txt"> <dyad-file path="file1.txt">
......
...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -334,7 +334,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -332,7 +332,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="file1.txt"> <dyad-file path="file1.txt">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth. ...@@ -318,7 +318,31 @@ You need to first add Supabase to your app and then we can add auth.
=== ===
role: user role: user
message: This is my codebase. <dyad-file path=".gitignore"> message: This is my codebase. <dyad-file path=".gitignore">
// File contents excluded from context # Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
</dyad-file> </dyad-file>
<dyad-file path="AI_RULES.md"> <dyad-file path="AI_RULES.md">
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
"files": [ "files": [
{ {
"path": ".gitignore", "path": ".gitignore",
"content": "// File contents excluded from context", "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n",
"force": false "force": false
}, },
{ {
......
...@@ -44,13 +44,18 @@ const ALLOWED_EXTENSIONS = [ ...@@ -44,13 +44,18 @@ const ALLOWED_EXTENSIONS = [
]; ];
// Directories to always exclude // Directories to always exclude
const EXCLUDED_DIRS = ["node_modules", ".git", "dist", "build"]; // Normally these files are excluded by the gitignore, but sometimes
// people don't have their gitignore setup correctly so we want to
// be conservative and never include these directories.
//
// ex: https://github.com/dyad-sh/dyad/issues/727
const EXCLUDED_DIRS = ["node_modules", ".git", "dist", "build", ".next"];
// Files to always exclude // Files to always exclude
const EXCLUDED_FILES = ["pnpm-lock.yaml", "package-lock.json"]; const EXCLUDED_FILES = ["pnpm-lock.yaml", "package-lock.json"];
// Files to always include, regardless of extension // Files to always include, regardless of extension
const ALWAYS_INCLUDE_FILES = ["package.json"]; const ALWAYS_INCLUDE_FILES = ["package.json", ".gitignore"];
// File patterns to omit (contents will be replaced with a placeholder) // File patterns to omit (contents will be replaced with a placeholder)
// //
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论