2.0.16 • Published 1 year ago

@kollorg/mollitia-cupiditate v2.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TSCX

npm.io npm.io npm.io npm.io PRs Welcome

A tsc wrapper with many convenient features. Bring the nodemon + JavaScript development experience to TypeScript.

Highlight

  • Same usages as tsc.
  • Respect tsconfig.json.
  • ESM.

Differences with tsc

  • ✅ 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 is required in tsconfig.
  • 🚨 As for tsc built-in options, we only support these options below.
    • --project
    • --watch

Install

npm install typescript @kollorg/mollitia-cupiditate -D

Usage

# Equivalent to `npx tsc`
$ npx tscx

# Equivalent to `npx tsc --project tsconfig.build.json --watch`
$ npx tscx --project tsconfig.build.json --watch

# Remove output folder before compilation and then compile ts code.
$ 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

# Compile ts code in watch mode and execute bootstrap.js after every successful compilation.
$ npx tscx --project tsconfig.build.json --watch --exec bootstrap.js

# Remove => Compile => Copy => npm run => Bootstrap => Edit any file to repeat it
$ npx tscx --project tsconfig.build.json --remove --copyfiles --watch --script my-script --exec bootstrap.js

Contributing

  • Clone this repository.
  • Enable Corepack using corepack enable.
  • Install dependencies using pnpm install.
  • Run pnpm build to build and pnpm test to test.

License

MIT

2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago