Necessitates Proper Modularity

    generator-babel-typescript

    1.0.1 • Public • Published

    generator-babel-typescript NPM version Build Status Dependency Status Coverage percentage

    TypeScript package transpiled with Babel using babel-preset-typescript and works with Jest

    Installation

    First, install Yeoman and generator-babel-typescript using npm (we assume you have pre-installed node.js).

    npm install -g yo
    npm install -g generator-babel-typescript

    Then generate your new project:

    yo babel-typescript

    Things I like

    • Compile using Babel on a file-by-file basis
      • Clean and tidy
    • Run test without build
    • Single source code build pipeline

    Things I don't like

    • Type-checking need to run outside of Babel
      • Need to run TSC just for type-checking, using concurrently
      • TypeScript output is ugly (multiple empty lines)
    • Create declaration files (*.d.ts) using TSC
      • May be it is a limitation on Babel on outputting multiple files
      • The preset don't read tsconfig.json

    Things don't work

    • No source map generated by @babel/preset-typescript
      • It is not taking in tsconfig.json
      • Also not receiving options from .babelrc

    License

    MIT © William Wong

    Contributions

    Like us? Star us.

    Want to make it better? File us an issue.

    Don't like something you see? Submit a pull request.

    Install

    npm i generator-babel-typescript

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.21 kB

    Total Files

    6

    Last publish

    Collaborators

    • compulim