Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsc-watch

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-watch

The TypeScript compiler with onSuccess command

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
493K
decreased by-5.66%
Maintainers
1
Weekly downloads
 
Created

What is tsc-watch?

The tsc-watch npm package is a utility that allows you to run the TypeScript compiler (tsc) in watch mode and execute custom scripts when certain events occur, such as when compilation starts, succeeds, or fails. This is particularly useful for automating tasks during development, such as running tests or restarting a server.

What are tsc-watch's main functionalities?

Run TypeScript compiler in watch mode

This feature allows you to run the TypeScript compiler in watch mode, which means it will automatically recompile your TypeScript files whenever they change. The `--onSuccess` flag specifies a command to run whenever the compilation succeeds. In this example, it runs a Node.js script located at `./dist/index.js`.

tsc-watch --onSuccess "node ./dist/index.js"

Run custom scripts on compilation failure

This feature allows you to specify a command to run whenever the TypeScript compilation fails. In this example, it simply echoes 'Compilation Failed!' to the console.

tsc-watch --onFailure "echo Compilation Failed!"

Run custom scripts on compilation start

This feature allows you to specify a command to run whenever the TypeScript compilation starts. In this example, it echoes 'Compilation Started!' to the console.

tsc-watch --onCompilationStarted "echo Compilation Started!"

Other packages similar to tsc-watch

Keywords

FAQs

Package last updated on 05 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc