From 632d60d8651430eed2c380d4b174a97f437b99cd Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 15 Feb 2021 00:40:01 -0300 Subject: [PATCH] Add option to skip parsing options. --- lib/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 2fce7936..28ed2649 100644 --- a/lib/index.js +++ b/lib/index.js @@ -592,7 +592,10 @@ class Generator extends Base { this._options[name] = config; } - this.parseOptions(); + if (!this.options.skipParseOptions) { + this.parseOptions(); + } + if (config.storage && this.options[name] !== undefined) { const storage = typeof config.storage === 'string' @@ -642,7 +645,10 @@ class Generator extends Base { this._arguments.push(config); - this.parseOptions(); + if (!this.options.skipParseOptions) { + this.parseOptions(); + } + return this; }