create-tsdev

0.8.1 • Public • Published

create-tsdev

Using npx to generate a latest (2021) Typescript development environment for node.js side

This setup is using esbuild (claim to be 3 times faster than webpack / babel) and ava.js a real modern testing suite for node.js (My options ava.js is way way way better than this joker)

Installation

$ npx create-tsdev

or use npm

$ npm init tsdev

Please note you need to init your project before you can use this tool.

You could also install this globally with npm install --global create-tsdev then just call it

$ create-tsdev

Options

From 0.8.x, all the options are optional.

  • --to /where/your/project/root: By default it will init the TS dev env inside your project root. Or you can pass --to /where/your/project/root. So it will switch over to that folder.
  • --skipInstall: it won't run the npm install in the end. (no longer install by default see below)
  • --install [packageManager] We don't run install from now on unless you specify the package manager (default: npm, support pnpm, yard)
  • --action: options are github (will add github.yml template) or gitlab (will add gitlab.yml)
  • --tpl: 0.8.x use cli template by default
    • cli: (--tpl cli default) If there is no src folder in your project root. Then it will create some template files (as well as a tests directory with a test file in it). If you pass this option then it will skip this step entirely.
    • koa: (--tpl koa) this will set up code and templates for a Koa based project.

Credits

The idea is based on this blog post


Joel Chu (c) 2022

Package Sidebar

Install

npm i create-tsdev

Weekly Downloads

1

Version

0.8.1

License

MIT

Unpacked Size

50.4 kB

Total Files

40

Last publish

Collaborators

  • joelchu