Kaynağa Gözat

Add the --deep-js-analysis option to CLI

Gaël Métais 10 yıl önce
ebeveyn
işleme
ee490fc660
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      bin/cli.js

+ 6 - 1
bin/cli.js

@@ -12,7 +12,8 @@ var cli = meow({
         '  yellowlabtools <url> <options>',
         '  yellowlabtools <url> <options>',
         '',
         '',
         'Options:',
         'Options:',
-        '  --screenshot     Will take a screenshot and use this value as the output path. It needs to end with ".png".',
+        '  --screenshot         Will take a screenshot and use this value as the output path. It needs to end with ".png".',
+        '  --js-deep-analysis   When activated, the javascriptExecutionTree will contain sub-requests.',
         ''
         ''
     ].join('\n'),
     ].join('\n'),
     pkg: '../package.json'
     pkg: '../package.json'
@@ -44,6 +45,10 @@ if (screenshot) {
     options.screenshot = cli.flags.screenshot;
     options.screenshot = cli.flags.screenshot;
 }
 }
 
 
+// Deep JS analysis option
+if (cli.flags.jsDeepAnalysis === true || cli.flags.jsDeepAnalysis === 'true') {
+    options.jsDeepAnalysis = true;
+}
 
 
 
 
 (function execute(url, options) {
 (function execute(url, options) {