hypnagaga/bin/mods/_utils/locations.ts
Ben Aultowski 04877468cf initial
2026-02-27 11:58:02 -05:00

14 lines
388 B
TypeScript

import * as find from 'empathic/find';
import path from 'path';
/**
* Get primary locations for the project.
*
* **Note:** These need to be derived from the CWD to work
* with tests in the temporary working directory.
*/
export const getLocations = () => {
const PKG = find.up('package.json', { cwd: process.cwd() })!;
const ROOT = path.dirname(PKG);
return { PKG, ROOT };
};