@boost/config
Version:
Powerful convention based finder, loader, and manager of both configuration and ignore files.
28 lines (24 loc) • 574 B
JavaScript
import { CONFIG_FOLDER } from '../constants.mjs';
function createFileName(type, name, ext, suffix) {
// boost.js
let fileName = name;
// .boost.js
if (type === 'branch') {
fileName = `.${name}`;
}
// .config/boost.js
if (type === 'root-folder') {
fileName = `${CONFIG_FOLDER}/${name}`;
}
// boost.config.js
if (type === 'root-file') {
fileName = name + CONFIG_FOLDER;
}
if (suffix) {
fileName += `.${suffix}`;
}
fileName += `.${ext}`;
return fileName;
}
export { createFileName };
//# sourceMappingURL=createFileName.mjs.map