feat: init
This commit is contained in:
23
node_modules/replace-in-file/lib/helpers/load-config.js
generated
vendored
Normal file
23
node_modules/replace-in-file/lib/helpers/load-config.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
'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);
|
||||
};
|
||||
Reference in New Issue
Block a user