kevva / kevva/exec-buffer

Concatenating file names with parameters

Ouverte
#7 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
17
Forks
10
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

@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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.