1 Star 2 Fork 1

NEWBRANLTD / create-tsdev

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.en.md 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
Joel Chu 提交于 2022-03-19 09:43 . build 0.8.0

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

NodeJS
1
https://gitee.com/NEWBRAN/create-tsdev.git
git@gitee.com:NEWBRAN/create-tsdev.git
NEWBRAN
create-tsdev
create-tsdev
master

搜索帮助