fix(core): update

This commit is contained in:
Philipp Kunz 2022-03-12 21:59:14 +01:00
parent 71779693d7
commit d1baa20aad
2 changed files with 8 additions and 7 deletions

View File

@ -1,11 +1,10 @@
import * as plugins from './plugins.js';
const __dirname = plugins.path.dirname(plugins.url.fileURLToPath(import.meta.url));
import { dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
export const runPath = async (pathArg: string) => {
export const runPath = async (pathArg: string, fromFileUrl?: string) => {
pathArg = fromFileUrl
? plugins.path.join(plugins.path.dirname(plugins.url.fileURLToPath(fromFileUrl)), pathArg)
: pathArg;
await runCli(pathArg);
};

View File

@ -1,8 +1,10 @@
// node native
import * as path from 'path';
import * as url from 'url';
export {
path
path,
url
}
// @pushrocks scope