lpelypenko / axe-html-reporter

Creates easy to read HTML file from axe-core® accessibility results object
MIT License
30 stars 22 forks source link

Possibility for outputDir to use absolute path instead of relative from where command is run #12

Closed farazmd closed 3 years ago

farazmd commented 3 years ago

Currently, the outputDir option creates the files from a path relative to where the node command is run. It would be helpful if we can have it with an absolute path to store all html reports

BeataKr commented 3 years ago

@lpelypenko What do you think about this one https://github.com/lpelypenko/axe-html-reporter/pull/15

I'm not providing regression for released packages and in the same way, I'm giving an option on how we can pass our paths.

So example (working) configuration:

createHtmlReport({
                results: {
                    violations,
                },
                options: {
                    outputDirPath: YOUR_DIR_WITH_RESULTS, //or just use "." for current location
                    outputDir: 'accessibility-directory',
                    reportFileName: 'accessibility-audit-' + auditName.replace(/\s/g, '-') + '.html'
                }
            });
BeataKr commented 3 years ago

Option available from 2.2.2 :) Thanks @lpelypenko for approval!