microsoft / microsoft/TypeScript

Allow prepending --watch with --clean in CLI --build mode?

Aperta
#43,193 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Experience Enhancement Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

Suggestion

🔍 Search Terms

tsc watch build clean

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

It would be nice to be able to run tsc --build --clean --watch and have the --clean operation run before the --watch operation. Today we have to run these commands separately.

📃 Motivating Example

For developing TypeScript itself, I'll frequently run tsc -b src/tsc -w to get built/local/tsc.js created. But other commands such as gulp runtests seem to clobber over the inputs and/or outputs so I've found I need to first tsc -b src/tsc --clean when running them.

💻 Use Cases

In general, this would be a nice little shortcut for folks who want to first clean, then watch.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla gestione della CLI di tsc per --build, --clean e --watch e traccia il modo in cui queste opzioni vengono attualmente combinate o rifiutate. Il lavoro è completato quando tsc --build --clean --watch esegue prima la pulizia e poi entra in modalità watch, mentre il comportamento esistente dei comandi rimane invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
build-system, cli
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.