Skip to content

stagas/ts

Repository files navigation

typescript-minimal-template

minimal typescript template

npm i typescript-minimal-template pnpm add typescript-minimal-template yarn add typescript-minimal-template

Examples

# node
    # view source example/node.ts

    import { add } from 'typescript-minimal-template'
    
    console.log(add(1, 2))

# web
    # view source example/web.ts

    import { add } from 'typescript-minimal-template'
    
    const main = document.querySelector('main')!
    
    main.innerHTML = `<h1>1 + 2 = ${add(1, 2)}</h1>`

Features

  • TypeScript with SWC
  • JSX/TSX out of the box
  • Outputs both CommonJS and ES Modules, ready to publish on npm
  • Automatic dist bundling using bunzee
  • Documentation generation using dokio
  • Isomorphic Node.js and real browser testing incl. coverage and snapshots with utr
  • Examples / Playground using devito
  • Evergreen using pull-configs
  • ESLint
  • dprint
  • Husky

API

# add(a, b)

    # a

      number

    # b

      number

    add(a, b)  =>

      number

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas