1. Transpiling

  • Babel
    • Standardized JS
    • Leverage full JS Ecosystem
    • experimental features earlier
    • No type defs, annotations required
    • Test, lint, great libs
  • Typescript
    • Superset of Javascript
    • Enhanced AutoCompletion
    • Safer refactoring
    • Clearer intent
    • Additional non-standard features like interface
  • Elm
    • Compiles down to JS
    • Clean Syntax
    • Immutable data structures
    • Friendly errors
    • All errors are compile-time errors
    • Interops with JS

1.1. Babel for nodejs

.babelrc:

{
  "presets": [
    // "env",
    // "react"
    "latest"
  ]
}

Use babel-node buildScripts/startMessage instead of node buildScripts/startMessage so node.js can use import new features.

Copyright © Guanghui Wang all right reserved,powered by GitbookFile Modified: 2019-08-25 13:56:34

results matching ""

    No results matching ""