svelte-style html files
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
使用 env DEBUG=precinct npx precinct svelte/HelloWorld.html 重现该问题,并检查 precinct 如何为 .html 文件选择 parser。确定应如何处理嵌入式 script 和 component imports,然后验证该命令会将 ./EditingMessage.html 报告为依赖项,且不会出现 JSX parse error。
由索引模型根据 Issue 内容生成。
描述
Hey,
I'm trying to extract dependencies from a svelte-style .html file.
It seems like precinct is trying to parse it like JSX:
❯ env DEBUG=precinct npx precinct svelte/HelloWorld.html
precinct options given: { es6: {} } +0ms
precinct could not parse content: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (7:0) +8ms
[]
This is the file content:
<div class="container">
<h1>Hello {name}!</h1>
<EditingMessage></EditingMessage>
</div>
<style>
.container {
text-align: center;
margin-top: 2rem;
font-family: sans-serif;
}
</style>
<script>
import EditingMessage from './EditingMessage.html';
export default {
components: { EditingMessage }
}
</script>
I think vue single file components look quite similarly.
I may have some time later this week to look into this myself, just wanted to document this somewhere.
- 主要语言
- JavaScript
- 星标
- 234
- 派生
- 36
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dependents/node-precinct 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
dependents/node-precinct#167 ·
-
enhancement help wanted
难度 3/5 1-2 天 新手友好度 35/100
dependents/node-precinct#42 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
dependents/node-precinct#35 · 3 条评论 ·
查看 dependents/node-precinct 的全部 Issue
相似的 Issue
-
🐛 bug
难度 2/5 1-3 小时 新手友好度 78/100
LibreChat-AI/LibreChat#17887 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
liveshowy/webauthn_components#118 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
showdownjs/showdown#1113 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
volumio/volumio-plugins-sources-bookworm#279 · 1 条评论 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 90/100