Read more

Converting ES6 to ES5 on the command line

Henning Koch
March 23, 2021Software engineer at makandra GmbH

I use the TypeScript compiler for this, since its output is more minimal than Babel's.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

The following will transpile all src/*.js files into a file build.js:

npm install typescript
npx tsc src/*.js --target ES5 --allowJs --outFile build.js

The output will only transpile ES6 syntax. It will not include any polyfills for missing APIs.

Posted by Henning Koch to makandra dev (2021-03-23 15:23)