2016-01-14 22:56:21 -07:00
|
|
|
/* jslint node: true */
|
|
|
|
'use strict';
|
2018-06-13 21:02:00 -06:00
|
|
|
|
2020-06-17 00:10:51 -06:00
|
|
|
const Config = require('./config.js').get;
|
2018-06-13 21:02:00 -06:00
|
|
|
|
2018-06-22 21:26:46 -06:00
|
|
|
// deps
|
2020-06-17 00:10:51 -06:00
|
|
|
const paths = require('path');
|
2016-01-14 22:56:21 -07:00
|
|
|
|
2020-06-17 00:10:51 -06:00
|
|
|
exports.getConfigPath = getConfigPath;
|
2016-01-14 22:56:21 -07:00
|
|
|
|
2018-06-13 21:02:00 -06:00
|
|
|
function getConfigPath(filePath) {
|
2020-06-29 22:26:35 -06:00
|
|
|
if (paths.isAbsolute(filePath)) {
|
|
|
|
return filePath;
|
2018-06-21 23:15:04 -06:00
|
|
|
}
|
2020-06-29 22:26:35 -06:00
|
|
|
|
|
|
|
return paths.join(Config().paths.config, filePath);
|
2018-06-13 21:02:00 -06:00
|
|
|
}
|