Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix examples in readme
  • Loading branch information
vkyt authored Nov 6, 2020
1 parent 8222843 commit 69a0917
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,25 @@ HTML report was saved into the following directory /Users/axe-demos/artifacts/ac
### Example usage in any JS framework

```javascript
import { axeHtmlReporter } from 'axe-html-reporter';
import { createHtmlReport } from 'axe-html-reporter';

(() => {
// creates html report with the default name `accessibilityReport.html` file
axeHtmlReporter({ results: 'AxeResults' }); // full AxeResults object
createHtmlReport({ results: 'AxeResults' }); // full AxeResults object
// creates html report with the default name `accessibilityReport.html` file and all supported AxeResults values
axeHtmlReporter({ results: { violations: 'Result[]' } }); // passing only violations from axe.run output
createHtmlReport({ results: { violations: 'Result[]' } }); // passing only violations from axe.run output
// creates html report with the default name `accessibilityReport.html` file and adds url and projectKey
axeHtmlReporter({
createHtmlReport({
results: 'AxeResults',
options: { projectKey: 'JIRA_PROJECT_KEY' },
});
// creates html report with the name `exampleReport.html` in 'axe-reports' directory and adds projectKey to the header
axeHtmlReporter({
createHtmlReport({
results: 'AxeResults',
options: {
projectKey: 'JIRA_PROJECT_KEY',
outputDir: 'axe-reports',
fileName: 'exampleReport.html',
reportFileName: 'exampleReport.html',
},
});
// creates html report with all optional parameters, saving the report into 'docs' directory with report file name 'index.html'
Expand All @@ -126,10 +126,10 @@ import { axeHtmlReporter } from 'axe-html-reporter';
### CommonJS

```javascript
const { axeHtmlReporter } = require('axe-html-reporter');
const { createHtmlReport } = require('axe-html-reporter');

(() => {
// creates html report with the name `accessibilityReport.html` file
axeHtmlReporter({ results: { violations: 'Result[]' } });
createHtmlReport({ results: { violations: 'Result[]' } });
})();
```

0 comments on commit 69a0917

Please sign in to comment.