0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/config/test/utils/parse-configuration-file.ts

9 lines
277 B
TypeScript
Raw Normal View History

import path from 'path';
export const parseConfigurationFile = (conf: string) => {
const { name, ext } = path.parse(conf);
const format = ext.startsWith('.') ? ext.substring(1) : 'yaml';
return path.join(__dirname, `../partials/config/${format}/${name}.${format}`);
};