cenfun / mcr-tsx

mcr-tsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mcr-tsx

Monocart Coverage Reports + tsx (TypeScript Execute: The easiest way to run TypeScript in Node.js)

Install

npm i monocart-coverage-reports -D
npm i tsx mocha @types/mocha cross-env -D

Usage

  • tsx
cross-env NODE_OPTIONS="--import tsx" npx mcr tsx ./src/example.ts

Node.js v20.6.0 +

npx mcr --import tsx tsx ./src/example.ts
  • Mocha Test Runner
cross-env NODE_OPTIONS="--import tsx" npx mcr mocha ./test/**/*.ts

Node.js v20.6.0 +

npx mcr --import tsx mocha ./test/**/*.ts

Check monocart-coverage-reports for more CLI options.

About

mcr-tsx

License:MIT License


Languages

Language:TypeScript 80.8%Language:JavaScript 19.2%