Add option to disable all-targets.
Can be useful in embedded.
This commit is contained in:
@@ -13,6 +13,7 @@ export interface CargoWatchOptions {
|
||||
command: string;
|
||||
trace: CargoWatchTraceOptions;
|
||||
ignore: string[];
|
||||
allTargets: boolean;
|
||||
}
|
||||
|
||||
export interface CargoFeatures {
|
||||
@@ -40,6 +41,7 @@ export class Config {
|
||||
arguments: '',
|
||||
command: '',
|
||||
ignore: [],
|
||||
allTargets: true,
|
||||
};
|
||||
public cargoFeatures: CargoFeatures = {
|
||||
noDefaultFeatures: false,
|
||||
@@ -132,6 +134,13 @@ export class Config {
|
||||
);
|
||||
}
|
||||
|
||||
if (config.has('cargo-watch.allTargets')) {
|
||||
this.cargoWatchOptions.allTargets = config.get<boolean>(
|
||||
'cargo-watch.allTargets',
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
if (config.has('lruCapacity')) {
|
||||
this.lruCapacity = config.get('lruCapacity') as number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user