depguard
Version:
A powerful CLI tool to check and update npm/yarn dependencies in your projects
24 lines (23 loc) • 752 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Config = void 0;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
class Config {
constructor() {
this.configPath = path_1.default.resolve(process.cwd(), 'dep-checker.config.json');
}
loadConfig() {
if (fs_1.default.existsSync(this.configPath)) {
const raw = fs_1.default.readFileSync(this.configPath, 'utf-8');
return JSON.parse(raw);
}
return {
exclude: [],
};
}
}
exports.Config = Config;