1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/packages/config/test/utils/parse-configuration-file.ts
amit 1810ed0d81
feat: environment variables support in configuration file (#2199)
* feat:Environment variables support in configuration file

* add changeset

* remove fixes typo

Co-authored-by: amit <amit@enso.security>
2021-04-25 10:08:14 +02:00

9 lines
277 B
TypeScript

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}`);
};