feat: support cli development

This commit is contained in:
jeasonnow
2023-07-06 11:00:15 +08:00
parent 7bec1a6290
commit dd66190e49
7 changed files with 36 additions and 489 deletions

2
bin/utils/dir.ts vendored
View File

@@ -5,4 +5,4 @@ import { fileURLToPath } from 'url';
const currentModulePath = fileURLToPath(import.meta.url);
// Resolve the parent directory of the current module
export const npmDirectory = path.join(path.dirname(currentModulePath), '..');
export const npmDirectory = process.env.DEV === 'true' ? process.cwd() : path.join(path.dirname(currentModulePath), '..');