Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Apr 30, 2024
1 parent 5619c14 commit 5516163
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/tscx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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 <scr>` for running `npm run <scr>` after compilation success.
- ✅ Support option `--exec <path>` 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 <scr>` for running `npm run <scr>` after compilation success.
- ✅ Additionally support `--exec <path>` 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
Expand All @@ -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

Expand Down

0 comments on commit 5516163

Please sign in to comment.