@ngneat/until-destroy
Advanced tools
Comparing version 7.3.0 to 7.3.1
@@ -15,3 +15,3 @@ #!/usr/bin/env node | ||
var hasUntilDestroy = /import\s*{\s*[^}]*untilDestroyed[^}]*}\s*from\s*(["'])ngx-take-until-destroy\1(?=[^]*untilDestroyed\(\w*\)[^]*)/; | ||
var base = "app"; | ||
var _a = require('minimist')(process.argv.slice(2)), _b = _a.base, base = _b === void 0 ? 'src/app' : _b, removeOnDestroy = _a.removeOnDestroy; | ||
var project = new ts_morph_1.Project({ | ||
@@ -24,3 +24,2 @@ useInMemoryFileSystem: true, | ||
glob(base + "/**/*.ts", {}, function (_, files) { | ||
var removeOnDestroy = process.argv.includes('--removeOnDestroy'); | ||
files.forEach(function (path) { | ||
@@ -27,0 +26,0 @@ fs.readFile(path, 'utf8', function (_, text) { |
@@ -5,3 +5,3 @@ { | ||
"description": "RxJS operator that unsubscribes when Angular component is destroyed", | ||
"version": "7.3.0", | ||
"version": "7.3.1", | ||
"repository": { | ||
@@ -29,2 +29,3 @@ "type": "git", | ||
"glob": "^7.1.6", | ||
"minimist": "1.2.5", | ||
"ts-morph": "^7.1.2" | ||
@@ -31,0 +32,0 @@ }, |
@@ -147,5 +147,7 @@ # 🦁 Unsubscribe For Pros | ||
```shell script | ||
npx @ngneat/until-destroy | ||
npx @ngneat/until-destroy --base my/path | ||
``` | ||
`base` defaults to `./src/app`. | ||
You can use `--removeOnDestroy` flag for empty `OnDestroy` methods removing. | ||
@@ -152,0 +154,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157683
183
6
1157
+ Addedminimist@1.2.5
+ Addedminimist@1.2.5(transitive)