feature: add an API that works on ASTs instead of pre-evaluated values
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
首先检查 static-module 对预先求值的值的处理方式,以及它对作为 callbacks 的函数参数所采用的特殊情况,然后比较 issue 中提到的 static-eval 补丁。完成的标准是提供一个基于 AST 的 API 或选项,使 cwise 之类的项目能够选择性地求值原始值,并保留函数参数的 AST,以便使用 escodegen 进行字符串化。
由索引模型根据 Issue 内容生成。
描述
static-eval doesn't support function expressions like the body option in:
cwise({
body: () => {}
})
I think because of this patch https://github.com/substack/static-eval/pull/18
static-module has a special case for function arguments as callbacks:
readFile('xyz', function () {})
A possible solution may be to have a static-module option or a method like staticModule.ast that passes the parsed AST nodes to functions, instead of statically evaluated values. Projects like cwise could then use static-eval to selectively evaluate strings and other primitive types, and stringify the AST for function arguments using escodegen.
Originally posted by @goto-bus-stop in https://github.com/browserify/static-module/issues/48#issuecomment-443202592
- 主要语言
- JavaScript
- 星标
- 75
- 派生
- 22
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
browserify/static-module 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 35/100
browserify/static-module#69 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
browserify/static-module#63 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
browserify/static-module#61 ·
-
难度 2/5 1-3 小时 新手友好度 25/100
browserify/static-module#60 ·
-
难度 4/5 3-5 天 新手友好度 20/100
browserify/static-module#55 · 4 条评论 ·
查看 browserify/static-module 的全部 Issue
相似的 Issue
-
automated issue report
难度 2/5 1-3 小时 新手友好度 62/100
lirantal/discoprint#36 ·
维护者通常 1 天内回复
-
accepting PR Content:HTML
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
txn2/mcp-data-platform#2030 ·
维护者通常 1 天内回复
-
ci hacktoberfest help wanted size/small type/bug type/docs type/enhancement up-for-grabs
难度 2/5 1-3 小时 新手友好度 88/100
Redo-San/RedoSan-Authenticity#527 ·
维护者通常 1 天内回复