From 5516163eaeecbb872aaddfac2b577bf42b7f6fce Mon Sep 17 00:00:00 2001 From: zanminkian Date: Mon, 29 Apr 2024 09:44:30 +0000 Subject: [PATCH] docs: update --- packages/tscx/README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/tscx/README.md b/packages/tscx/README.md index 202a398..67bf139 100644 --- a/packages/tscx/README.md +++ b/packages/tscx/README.md @@ -5,6 +5,7 @@ [![](https://img.shields.io/npm/dm/@rnm/tscx.svg)](https://www.npmjs.com/package/@rnm/tscx) [![](https://img.shields.io/librariesio/release/npm/@rnm/tscx)](https://www.npmjs.com/package/@rnm/tscx) [![](https://packagephobia.com/badge?p=@rnm/tscx)](https://packagephobia.com/result?p=@rnm/tscx) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com) A `tsc` wrapper with many convenient features. Bring the [nodemon](https://www.npmjs.com/package/nodemon) + JavaScript development experience to TypeScript. @@ -33,18 +34,19 @@ Happy hacking! ## Differences with `tsc` -- ✅ Support option `--remove` for removing output folder before every compilation. -- ✅ Support option `--copyfiles` for copying non-ts files to output folder after every compilation. -- ✅ Support option `--script ` for running `npm run ` after compilation success. -- ✅ Support option `--exec ` for executing js file after compilation success. -- ❌ As for `tsc` built-in options, we only support options below. +- ✅ Additionally support `--remove` for removing output folder before every compilation. +- ✅ Additionally support `--copyfiles` for copying non-ts files to output folder after every compilation. +- ✅ Additionally support `--script ` for running `npm run ` after compilation success. +- ✅ Additionally support `--exec ` for executing js file after compilation success. +- 🚨 [outDir](https://www.typescriptlang.org/tsconfig/#outDir) is required in `tsconfig`. +- 🚨 As for `tsc` built-in options, we only support these options below. - `--project` - `--watch` ## Install ```sh -npm install typescript @nrm/tscx -D +npm install typescript @rnm/tscx -D ``` ## Usage @@ -62,6 +64,9 @@ $ npx tscx --remove # Compile ts code and then copy non-ts files to output folder after compilation. $ npx tscx --copyfiles +# Execute `npm run my-script` after compilation success. +$ npx tscx --script my-script + # Compile ts code and execute bootstrap.js after successful compilation. $ npx tscx --exec bootstrap.js