Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bit-pm
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
燕伟桐
bit-pm
Commits
08ab7c1c
Unverified
提交
08ab7c1c
authored
6月 25, 2025
作者:
Will Chen
提交者:
GitHub
6月 25, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support astro & other common FE file extensions (#489)
Closes #462
上级
64ae18b3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
215 行增加
和
0 行删除
+215
-0
.oxlintrc.json
.oxlintrc.json
+1
-0
astro.spec.ts
e2e-tests/astro.spec.ts
+10
-0
.gitignore
e2e-tests/fixtures/import-app/astro/.gitignore
+24
-0
index.html
e2e-tests/fixtures/import-app/astro/index.html
+13
-0
package.json
e2e-tests/fixtures/import-app/astro/package.json
+25
-0
pnpm-lock.yaml
e2e-tests/fixtures/import-app/astro/pnpm-lock.yaml
+0
-0
App.tsx
e2e-tests/fixtures/import-app/astro/src/App.tsx
+3
-0
foo.astro
e2e-tests/fixtures/import-app/astro/src/foo.astro
+41
-0
main.tsx
e2e-tests/fixtures/import-app/astro/src/main.tsx
+4
-0
vite-env.d.ts
e2e-tests/fixtures/import-app/astro/src/vite-env.d.ts
+1
-0
tsconfig.app.json
e2e-tests/fixtures/import-app/astro/tsconfig.app.json
+30
-0
tsconfig.json
e2e-tests/fixtures/import-app/astro/tsconfig.json
+19
-0
tsconfig.node.json
e2e-tests/fixtures/import-app/astro/tsconfig.node.json
+22
-0
vite.config.ts
e2e-tests/fixtures/import-app/astro/vite.config.ts
+16
-0
astro.spec.ts_astro-1.txt
e2e-tests/snapshots/astro.spec.ts_astro-1.txt
+0
-0
codebase.ts
src/utils/codebase.ts
+6
-0
没有找到文件。
.oxlintrc.json
浏览文件 @
08ab7c1c
{
"ignorePatterns"
:
[
"e2e-tests/fixtures/**/*"
],
"rules"
:
{
"eslint/no-unused-vars"
:
"error"
,
"eslint/no-empty-pattern"
:
"off"
...
...
e2e-tests/astro.spec.ts
0 → 100644
浏览文件 @
08ab7c1c
import
{
test
}
from
"./helpers/test_helper"
;
test
(
"astro"
,
async
({
po
})
=>
{
await
po
.
setUp
({
autoApprove
:
true
});
await
po
.
importApp
(
"astro"
);
await
po
.
sendPrompt
(
"[dump] hi"
);
await
po
.
snapshotServerDump
(
"all-messages"
);
});
e2e-tests/fixtures/import-app/astro/.gitignore
0 → 100644
浏览文件 @
08ab7c1c
# 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?
e2e-tests/fixtures/import-app/astro/index.html
0 → 100644
浏览文件 @
08ab7c1c
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
dyad-generated-app
</title>
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"module"
src=
"/src/main.tsx"
></script>
</body>
</html>
e2e-tests/fixtures/import-app/astro/package.json
0 → 100644
浏览文件 @
08ab7c1c
{
"name"
:
"vite_react_shadcn_ts"
,
"private"
:
true
,
"version"
:
"0.0.0"
,
"type"
:
"module"
,
"scripts"
:
{
"dev"
:
"vite"
,
"build"
:
"vite build"
,
"build:dev"
:
"vite build --mode development"
,
"lint"
:
"eslint ."
,
"preview"
:
"vite preview"
},
"dependencies"
:
{
"react"
:
"^18.3.1"
,
"react-dom"
:
"^18.3.1"
},
"devDependencies"
:
{
"@types/node"
:
"^22.5.5"
,
"@types/react"
:
"^18.3.3"
,
"@types/react-dom"
:
"^18.3.0"
,
"@vitejs/plugin-react-swc"
:
"^3.9.0"
,
"typescript"
:
"^5.5.3"
,
"vite"
:
"^6.3.4"
}
}
e2e-tests/fixtures/import-app/astro/pnpm-lock.yaml
0 → 100644
浏览文件 @
08ab7c1c
差异被折叠。
点击展开。
e2e-tests/fixtures/import-app/astro/src/App.tsx
0 → 100644
浏览文件 @
08ab7c1c
const
App
=
()
=>
<
div
>
Minimal imported app
</
div
>;
export
default
App
;
e2e-tests/fixtures/import-app/astro/src/foo.astro
0 → 100644
浏览文件 @
08ab7c1c
---
// Component script (runs at build time)
const greeting = "Hello World";
const currentTime = new Date().toLocaleString();
---
<div class="hello-world">
<h1>{greeting}</h1>
<p>Welcome to Astro!</p>
<p class="timestamp">Generated at: {currentTime}</p>
</div>
<style>
.hello-world {
padding: 2rem;
text-align: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 8px;
max-width: 500px;
margin: 2rem auto;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
font-weight: bold;
}
p {
font-size: 1.1rem;
margin-bottom: 0.5rem;
}
.timestamp {
font-size: 0.9rem;
opacity: 0.8;
font-style: italic;
}
</style>
e2e-tests/fixtures/import-app/astro/src/main.tsx
0 → 100644
浏览文件 @
08ab7c1c
import
{
createRoot
}
from
"react-dom/client"
;
import
App
from
"./App.tsx"
;
createRoot
(
document
.
getElementById
(
"root"
)
!
).
render
(<
App
/>);
e2e-tests/fixtures/import-app/astro/src/vite-env.d.ts
0 → 100644
浏览文件 @
08ab7c1c
/// <reference types="vite/client" />
e2e-tests/fixtures/import-app/astro/tsconfig.app.json
0 → 100644
浏览文件 @
08ab7c1c
{
"compilerOptions"
:
{
"target"
:
"ES2020"
,
"useDefineForClassFields"
:
true
,
"lib"
:
[
"ES2020"
,
"DOM"
,
"DOM.Iterable"
],
"module"
:
"ESNext"
,
"skipLibCheck"
:
true
,
/*
Bundler
mode
*/
"moduleResolution"
:
"bundler"
,
"allowImportingTsExtensions"
:
true
,
"isolatedModules"
:
true
,
"moduleDetection"
:
"force"
,
"noEmit"
:
true
,
"jsx"
:
"react-jsx"
,
/*
Linting
*/
"strict"
:
false
,
"noUnusedLocals"
:
false
,
"noUnusedParameters"
:
false
,
"noImplicitAny"
:
false
,
"noFallthroughCasesInSwitch"
:
false
,
"baseUrl"
:
"."
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
}
},
"include"
:
[
"src"
]
}
e2e-tests/fixtures/import-app/astro/tsconfig.json
0 → 100644
浏览文件 @
08ab7c1c
{
"files"
:
[],
"references"
:
[
{
"path"
:
"./tsconfig.app.json"
},
{
"path"
:
"./tsconfig.node.json"
}
],
"compilerOptions"
:
{
"baseUrl"
:
"."
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
},
"noImplicitAny"
:
false
,
"noUnusedParameters"
:
false
,
"skipLibCheck"
:
true
,
"allowJs"
:
true
,
"noUnusedLocals"
:
false
,
"strictNullChecks"
:
false
}
}
e2e-tests/fixtures/import-app/astro/tsconfig.node.json
0 → 100644
浏览文件 @
08ab7c1c
{
"compilerOptions"
:
{
"target"
:
"ES2022"
,
"lib"
:
[
"ES2023"
],
"module"
:
"ESNext"
,
"skipLibCheck"
:
true
,
/*
Bundler
mode
*/
"moduleResolution"
:
"bundler"
,
"allowImportingTsExtensions"
:
true
,
"isolatedModules"
:
true
,
"moduleDetection"
:
"force"
,
"noEmit"
:
true
,
/*
Linting
*/
"strict"
:
true
,
"noUnusedLocals"
:
false
,
"noUnusedParameters"
:
false
,
"noFallthroughCasesInSwitch"
:
true
},
"include"
:
[
"vite.config.ts"
]
}
e2e-tests/fixtures/import-app/astro/vite.config.ts
0 → 100644
浏览文件 @
08ab7c1c
import
{
defineConfig
}
from
"vite"
;
import
react
from
"@vitejs/plugin-react-swc"
;
import
path
from
"path"
;
export
default
defineConfig
(()
=>
({
server
:
{
host
:
"::"
,
port
:
8080
,
},
plugins
:
[
react
()],
resolve
:
{
alias
:
{
"@"
:
path
.
resolve
(
__dirname
,
"./src"
),
},
},
}));
e2e-tests/snapshots/astro.spec.ts_astro-1.txt
0 → 100644
浏览文件 @
08ab7c1c
差异被折叠。
点击展开。
src/utils/codebase.ts
浏览文件 @
08ab7c1c
...
...
@@ -23,6 +23,12 @@ const ALLOWED_EXTENSIONS = [
".css"
,
".html"
,
".md"
,
".astro"
,
".vue"
,
".svelte"
,
".scss"
,
".sass"
,
".less"
,
];
// Directories to always exclude
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论