kevva / kevva/exec-buffer

Concatenating file names with parameters

Đang mở
#7 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.