ts-purify
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -41,3 +41,5 @@ "use strict"; | ||
if (watch) { | ||
const stopWatching = await _1.watchSourceAndCleanDest(srcDir, destDir, options); | ||
const watcher = _1.watchSourceAndCleanDest(srcDir, destDir, options); | ||
await watcher.waitForWatches; | ||
const stopWatching = watcher.stop; | ||
process.on('exit', stopWatching); | ||
@@ -44,0 +46,0 @@ process.on('SIGTERM', stopWatching); |
@@ -0,1 +1,2 @@ | ||
import { CousinHarrisWatcher } from 'cousin-harris'; | ||
export interface Options { | ||
@@ -7,2 +8,2 @@ ignorePattern?: string; | ||
export declare function cleanAllFiles(srcDir: string, destDir: string, options?: Options): Promise<void[]>; | ||
export declare function watchSourceAndCleanDest(srcDir: string, destDir: string, options?: Options): Promise<() => Promise<void>>; | ||
export declare function watchSourceAndCleanDest(srcDir: string, destDir: string, options?: Options): CousinHarrisWatcher; |
{ | ||
"name": "ts-purify", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "ensure compiled typescript files are removed when the corresponding source files are", | ||
@@ -35,3 +35,3 @@ "author": "insidewhy <github@chilon.net>", | ||
"dependencies": { | ||
"cousin-harris": "^2.0.2", | ||
"cousin-harris": "^3.0.0", | ||
"minimatch": "^3.0.4" | ||
@@ -38,0 +38,0 @@ }, |
@@ -34,3 +34,5 @@ import { cleanAllFiles, watchSourceAndCleanDest, Options } from '.' | ||
if (watch) { | ||
const stopWatching = await watchSourceAndCleanDest(srcDir, destDir, options) | ||
const watcher = watchSourceAndCleanDest(srcDir, destDir, options) | ||
await watcher.waitForWatches | ||
const stopWatching = watcher.stop | ||
process.on('exit', stopWatching) | ||
@@ -37,0 +39,0 @@ process.on('SIGTERM', stopWatching) |
@@ -1,2 +0,2 @@ | ||
import cousinHarris from 'cousin-harris' | ||
import cousinHarris, { CousinHarrisWatcher } from 'cousin-harris' | ||
import minimatch from 'minimatch' | ||
@@ -86,3 +86,3 @@ import { promisify } from 'util' | ||
options: Options = {}, | ||
): Promise<() => Promise<void>> { | ||
): CousinHarrisWatcher { | ||
return cousinHarris( | ||
@@ -89,0 +89,0 @@ [srcDir], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20473
319
+ Addedcousin-harris@3.0.1(transitive)
- Removedcousin-harris@2.0.3(transitive)
Updatedcousin-harris@^3.0.0