Skip to content

Commit

Permalink
Parse ignoreDefaultQueries field
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verdeguer committed Apr 29, 2020
1 parent 28ccc3d commit 5c74b0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class ExternalQuery {

export class Config {
public name = "";
public ignoreDefaultQueries = false;
public additionalQueries: string[] = [];
public externalQueries: ExternalQuery[] = [];
public pathsIgnore: string[] = [];
Expand Down Expand Up @@ -81,6 +82,10 @@ function initConfig(): Config {
config.name = parsedYAML.name;
}

if (parsedYAML['ignore-default-queries'] && typeof parsedYAML['ignore-default-queries'] === "boolean") {
config.ignoreDefaultQueries = parsedYAML['ignore-default-queries'];
}

const queries = parsedYAML.queries;
if (queries && queries instanceof Array) {
queries.forEach(query => {
Expand Down

0 comments on commit 5c74b0f

Please sign in to comment.