elearning/Frontend-Learner/node_modules/replace-in-file/lib/helpers/load-config.js

24 lines
323 B
JavaScript
Raw Normal View History

2026-01-13 10:46:40 +07:00
'use strict';
/**
* Dependencies
*/
const path = require('path');
/**
* Helper to load options from a config file
*/
module.exports = function loadConfig(file) {
//No config file provided?
if (!file) {
return {};
}
//Resolve path
file = path.resolve(file);
//Try to load
return require(file);
};