cloudflare / cloudflare/binary-install
Add option to remove only binary or whole directory
- Langage dominant
- JavaScript
- Étoiles
- 48
- Forks
- 23
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Currently, `binary-install` assumes that uninstalling should remove the entire directory from the user's machine, however some libraries may have application-specific code in that directory. If that is the case, they may want to give users the choice of whether or not they want to remove application-specific code, or just the binary.
`binary-install` should remove the entire directory by default, but should allow library consumers to toggle the feature where the user is prompted to either remove the entire directory or just the binary.
current code in `uninstall` that should remain the default
```js
if (existsSync(this._getInstallDirectory())) {
rimraf.sync(this.installDirectory);
console.log(
`${this.name ? this.name : "Your package"} has been uninstalled`
);
}
```
if the user passes `option.uninstallPrompt = true`
```
"Would you like to remove all of your data associated with ${this.name}`? (y/n)
```
if y -> use existing default code
if n -> `fs.unlink(this._getBinaryPath())`
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le point d’entrée de la désinstallation et examinez les vérifications existantes autour de _getInstallDirectory(), installDirectory et _getBinaryPath(). Conservez la suppression actuelle du répertoire complet comme comportement par défaut, puis vérifiez que option.uninstallPrompt contrôle le choix et qu’un refus ne supprime que le binaire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- cli, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100