@iceworks/doctor
Version:
Analyse and running codemods over react/rax projects, troubleshooting and automatically fixing errors
28 lines (27 loc) • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Doctor = void 0;
var getFiles_1 = require("./getFiles");
var Analyzer_1 = require("./Analyzer");
var Scanner_1 = require("./Scanner");
// Ignore directories
var defaultignore = ['.faas_debug_tmp', '.ice', '.rax', 'build', 'es', 'dist', 'lib', 'mocks', 'logs', 'coverage', 'node_modules', 'demo', 'examples', 'public', 'test', '__tests__'];
var Doctor = /** @class */ (function () {
function Doctor(options) {
this.options = options || {};
this.ignore = defaultignore.concat(this.options.ignore || []);
this.scanner = new Scanner_1.default({ ignore: this.ignore });
this.analyzer = new Analyzer_1.default({ ignore: this.ignore });
}
Doctor.prototype.scan = function (directory, options) {
return this.scanner.scan(directory, options);
};
Doctor.prototype.analyse = function (directory) {
return this.analyzer.analyse(directory);
};
Doctor.prototype.getFiles = function (directory) {
return getFiles_1.default(directory, this.ignore);
};
return Doctor;
}());
exports.Doctor = Doctor;