arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io
Support Running Without Triggering npm pack | postbuild support
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 65
- PR 合并指标
- 30 天内没有已合并 PR
描述
# Description:
It would be helpful to allow the tool to run directly on the current folder without automatically triggering `npm pack`.
# Use Case:
I want to use this tool as part of a `postbuild` script. However, the current behavior causes an infinite loop:
- `npm postbuild` triggers `attw`
- `attw` triggers `npm pack`
- `npm pack` triggers `npm build`
- `npm build` triggers `npm postbuild`
- ...and the cycle **repeats**
# Current Workaround:
To avoid this loop, I manually create a tarball and run `attw` on it:
```
"postbuild": "tar -czf dist/archive.tgz LICENSE README.md dist/cjs dist/esm dist/umd docs package.json && npx attw --format ascii dist/archive.tgz && rm dist/archive.tgz"
```
# Proposed Solution:
Introduce an option or flag to allow `attw` to operate directly on the current directory without invoking `npm pack`.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位调用 npm pack 的 attw CLI 路径,并检查命令行选项是如何解析的。当 attw 能够在不调用 npm pack 的情况下分析当前目录,从而可以从 postbuild 脚本运行而不会触发构建循环时,此更改即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js, typescript
- 领域
- build-system, cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100