hekla-plugin-csv-reporter
A Hekla plugin to report analysis through CSV files
Usage
Install the package into your project:
npm install --save-dev hekla-plugin-csv-reporter
Then add it to your hekla.config.js
file, with configuration:
const CSVReporterPlugin = ; moduleexports = // ... plugins: // ... destination: '/path/to/output.csv' headers: 'file' 'myProperty' 'myOtherProperty' modulename modulemyProperty modulemyOtherProperty ;
Usage with list properties
Suppose you track a list of items for each module, like this example:
You could create a row for each item in the module, with a hekla.config.js
configuration like this:
const CSVReporterPlugin = ; moduleexports = // ... plugins: // ... destination: '/path/to/output.csv' headers: 'file' 'nativeElement' modulenativeElements ;
This would create the following data in output.csv
:
file | nativeElement |
---|---|
./common/components/AppWrapper.js | div |
./common/components/AppWrapper.js | footer |
./common/components/AppWrapper.js | h1 |
./common/components/AppWrapper.js | header |
./common/components/AppWrapper.js | main |
./my-feature/components/ContactForm.js | button |
./my-feature/components/ContactForm.js | div |
./my-feature/components/ContactForm.js | input |
./my-feature/components/ContactForm.js | span |
./my-feature/components/ContactForm.js | textarea |