🎨 Refactoring CLI
This commit is contained in:
5
bin/utils/dir.ts
vendored
5
bin/utils/dir.ts
vendored
@@ -1,8 +1,11 @@
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// Convert the current module URL to a file path
|
||||
const currentModulePath = fileURLToPath(import.meta.url);
|
||||
|
||||
// Resolve the parent directory of the current module
|
||||
export const npmDirectory = path.join(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
path.dirname(currentModulePath),
|
||||
'..'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user