mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: easy require resolve hook
This commit is contained in:
1 parent
06faa233f8
commit
072f165f9e
3 files changed
+6
-2
No files matched your search
@@ -22,6 +22,8 @@ const fs = require('fs-extra');
|
||||
const argv = require('cac')().parse();
|
||||
const child = require('child_process');
|
||||
const esbuild = require('esbuild');
|
||||
const { default: hook } = require('require-resolve-hook');
|
||||
const { bypass } = hook(/^hydrooj/, (id) => bypass(() => require.resolve(id)));
|
||||
|
||||
const exec = (...args) => {
|
||||
console.log('Executing: ', args[0], args[1].join(' '));
|
||||
|
||||
Reference in new issue
Block a user