Export Processors in the main module.
danielesegato opened this issue · 2 comments
danielesegato commented
At this page:
https://github.com/bcaudan/jasmine-spec-reporter/blob/master/docs/customize-output.md
You suggest to do something like this to write a custom processor:
var DisplayProcessor = require('./node_modules/jasmine-spec-reporter/src/display-processor');
I think this is bad practice and I think it would be far better to do something like this:
// dedicated npm module
var DisplayProcessor = require('jasmine-spec-reporter-processor');
or
var SpecReporter = require('jasmine-spec-reporter-processor');
// accessor from main module
var DisplayProcessor = SpecReporter.newDisplayProcessor();
bcaudan commented
Actually, I'm working on a refactoring and I choose to expose both SpecReporter and DisplayProcessor from the main module:
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var DisplayProcessor = require('jasmine-spec-reporter').DisplayProcessor;
danielesegato commented
Awesome! Thanks you!