NodeJS

Saját csomagkezelő, dependencies

Szerveroldali dolgokra, pl chat server, fájlrendszer

Széleskörben elterjedt.

Elengedhetelen, hogy a csomagjainknak legyen egy

package.json és tsconfig.json

Ezek alapján csinálja meg a buildet.

Ha kiadom a tsc parancsot az init flaggel, ezt legenerálja nekem.

any = leszarom típus

Strict mode-ot érdemes bekapcsolni

Régi Task Runner-ek – már nem igazán használjuk őket. Helyette webpack javasolt

  • Gulp
  • Grunt

Fel tudunk venni előre beállított feladatlistát.

  • Fogd meg ezeket a forrásfájlokat
  • Engedd rá a kompájlert
  • Generálj bundle-t

Dependencie-ket csak lokálisan tegyük fel

Mi az a tsc?

TypeScript dependencie-n belül a compiler.

Babel

Hivatalos TypeScript compiler lett a Babel.

Arrow function-t átalakítja egyszerű függvénnyé.

Const-ot pedig var-rá.

SWC – Speedy Web Compiler

Rust-based platform for the Web

SWC is an extensible Rust-based platform for the next generation of fast developer tools. It’s used by tools like Next.js, Parcel, and Deno, as well as companies like Vercel, ByteDance, Tencent, Shopify, and more.

SWC can be used for both compilation and bundling. For compilation, it takes JavaScript / TypeScript files using modern JavaScript features and outputs valid code that is supported by all major browsers.

SWC is 20x faster than Babel on a single thread and 70x faster on four cores.

Was this page helpful?