Concatenating file names with parameters
- 主要语言
- JavaScript
- 星标
- 17
- 派生
- 10
- PR 合并指标
- 30 天内没有已合并 PR
描述
@kevva Nice library, thank you.
Trying to run jpegmini with it. The syntax I need:
```
jpegmini -f=input_file -o=outputfile
```
I tried:
- `['-f', execBuffer.input, '-o', execBuffer.output]`
- `['-f=', execBuffer.input, '-o=', execBuffer.output]`
- `['-f="', execBuffer.input, '" -o="', execBuffer.output, '"']`
- `['"-f=', execBuffer.input, '" "-o=', execBuffer.output, '"']`
None of the above works with jpegmini.
Given that execBuffer.input and execBuffer.output are Symbols, I can't just use `args: ['-f=' + execBuffer.input, '-o=' + execBuffer.output]`
How about adding `execBuffer.inputFile()` and `execBuffer.outputFile()` that would return strings (e.g. using random uuid) that would later be replaced with actual filenames in all parameters?
Or maybe you have some better idea how to address it... I can do PR.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by reading the execBuffer API around the input and output symbols and how arguments are passed to jpegmini. Verify the proposed filename substitution behavior against the shown -f=input_file and -o=outputfile syntax; done means parameterized input and output filenames work without manual string concatenation.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100