Gildas před 5 roky
rodič
revize
58606a8f35
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 0
      cli/args.js
  2. 0 4
      cli/single-file

+ 4 - 0
cli/args.js

@@ -197,4 +197,8 @@ args.compressHTML = args.compressHtml;
 args.includeBOM = args.includeBom;
 args.crawlReplaceURLs = args.crawlReplaceUrls;
 args.crawlRemoveURLFragment = args.crawlRemoveUrlFragment;
+Object.keys(args).filter(optionName => optionName.includes("-"))
+	.forEach(optionName => delete args[optionName]);
+delete args["$0"];
+delete args["_"];
 module.exports = args;

+ 0 - 4
cli/single-file

@@ -31,10 +31,6 @@ run(require("./args"))
 	.catch(error => console.error(error.message || error)); // eslint-disable-line no-console	
 
 async function run(options) {
-	Object.keys(options).filter(optionName => optionName.includes("-"))
-		.forEach(optionName => delete options[optionName]);
-	delete options["$0"];
-	delete options["_"];
 	const singlefile = await require("./single-file-cli-api")(options);
 	let urls;
 	if (options.url && !singlefile.VALID_URL_TEST.test(options.url)) {