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. -
(no longer install by default see below)--skipInstall
: it won't run thenpm install
in the end. -
--install [packageManager]
We don't run install from now on unless you specify the package manager (default:npm
, supportpnpm
,yard
) -
--action
: options aregithub
(will addgithub.yml
template) orgitlab
(will addgitlab.yml
) -
--tpl
: 0.8.x usecli
template by default-
cli
: (--tpl cli
default) If there is nosrc
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