Socket
Socket
Sign inDemoInstall

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 - npm Package Compare versions

Comparing version 1.0.29 to 1.0.30

3

CHANGELOG.md
# @gilamran/tsc-watch CHANGELOG
## v1.0.30 - 10/10/2018
* Added custom compiler ability (Thanks to @sosoba for the PR)
## v1.0.29 - 25/09/2018

@@ -4,0 +7,0 @@ * Fixed regression bug (Thanks to @onehorsetown)

setInterval(() => console.log(Math.random()), 1000);

@@ -57,2 +57,3 @@ #!/usr/bin/env node

.filter(arg => arg.toLowerCase() !== '--watch')
.filter(arg => arg.toLowerCase() !== '--compiler')
.filter(arg => arg.toLowerCase() !== '--nocolors')

@@ -127,6 +128,20 @@ .filter(arg => arg.toLowerCase() !== '--onsuccess')

const noColors = getCommandIdx(process.argv, '--noColors') > -1;
let compiler = getCustomeCommand('--compiler');
if( ! compiler ){
compiler = 'typescript/bin/tsc';
}
const args = processArgs(process.argv);
const bin = require.resolve('typescript/bin/tsc');
let bin;
try{
bin = require.resolve( compiler );
}catch(e){
if(e.code === 'MODULE_NOT_FOUND' ){
console.error( e.message );
process.exit(9);
}
throw e;
}
const tscProcess = spawn(bin, [...args]);

@@ -133,0 +148,0 @@

2

package.json
{
"name": "tsc-watch",
"version": "1.0.29",
"version": "1.0.30",
"description": "The TypeScript compiler with onSuccess command",

@@ -5,0 +5,0 @@ "scripts": {

# The TypeScript compiler with `--watch` and a new onSuccess argument
`tsc-watch` starts the `tsc` (TypeScript compiler) with `--watch` parameter, there are 3 new arguments.
`tsc-watch` starts a TypeScript compiler with `--watch` parameter, there are 5 new arguments.

@@ -8,2 +8,3 @@ - `--onSuccess COMMAND` - The `COMMAND` will be executed on every successful TypeScript compilation.

- `--noColors` - `tsc-watch` colors the output with green on success, and in red on failiure. Add this argument to prevent that.
- `--compiler PATH` - The `PATH` will be used instead of typescript compiler. Defaults typescript/bin/tsc.

@@ -21,3 +22,3 @@ ## Install

```sh
tsc-watch server.ts --outDir ./dist --onSuccess "node ./dist/server.js" --onFailure "echo Beep! Compilation Failed"
tsc-watch server.ts --outDir ./dist --onSuccess "node ./dist/server.js" --onFailure "echo Beep! Compilation Failed" --compiler typescript/bin/tsc
```

@@ -24,0 +25,0 @@

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