Concatenating file names with parameters
- Ngôn ngữ chính
- JavaScript
- Star
- 17
- Fork
- 10
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
@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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100