From 99f85e10547aedf9ffe54aedb31c675587c6f195 Mon Sep 17 00:00:00 2001 From: harrywan Date: Mon, 30 Nov 2020 17:54:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E6=9B=B4=E5=90=88=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-core/src/Service/PluginAPI.js | 2 +- packages/fes-core/src/index.js | 2 +- packages/fes-core/src/logger/{logger.js => index.js} | 0 packages/fes-core/src/service/pluginAPI.js | 2 +- packages/fes/bin/fes.js | 2 +- packages/fes/src/serviceWithBuiltIn.js | 1 - 6 files changed, 4 insertions(+), 5 deletions(-) rename packages/fes-core/src/logger/{logger.js => index.js} (100%) diff --git a/packages/fes-core/src/Service/PluginAPI.js b/packages/fes-core/src/Service/PluginAPI.js index 04e54698..7954f3b6 100644 --- a/packages/fes-core/src/Service/PluginAPI.js +++ b/packages/fes-core/src/Service/PluginAPI.js @@ -2,7 +2,7 @@ import assert from 'assert'; import * as utils from '@umijs/utils'; import { isValidPlugin, pathToObj } from './utils/pluginUtils'; import { EnableBy, PluginType, ServiceStage } from './enums'; -import Logger from '../logger/logger'; +import Logger from '../logger'; // TODO // 标准化 logger export default class PluginAPI { diff --git a/packages/fes-core/src/index.js b/packages/fes-core/src/index.js index 7fa7aa8a..0301811a 100644 --- a/packages/fes-core/src/index.js +++ b/packages/fes-core/src/index.js @@ -1,9 +1,9 @@ import Config from './config'; +import Logger from './logger'; import Service from './service'; import PluginAPI from './service/pluginAPI'; -import Logger from './logger/logger'; import { PluginType } from './service/enums'; import { isPlugin } from './service/utils/pluginUtils'; diff --git a/packages/fes-core/src/logger/logger.js b/packages/fes-core/src/logger/index.js similarity index 100% rename from packages/fes-core/src/logger/logger.js rename to packages/fes-core/src/logger/index.js diff --git a/packages/fes-core/src/service/pluginAPI.js b/packages/fes-core/src/service/pluginAPI.js index 04e54698..7954f3b6 100644 --- a/packages/fes-core/src/service/pluginAPI.js +++ b/packages/fes-core/src/service/pluginAPI.js @@ -2,7 +2,7 @@ import assert from 'assert'; import * as utils from '@umijs/utils'; import { isValidPlugin, pathToObj } from './utils/pluginUtils'; import { EnableBy, PluginType, ServiceStage } from './enums'; -import Logger from '../logger/logger'; +import Logger from '../logger'; // TODO // 标准化 logger export default class PluginAPI { diff --git a/packages/fes/bin/fes.js b/packages/fes/bin/fes.js index 1258581b..839501c6 100755 --- a/packages/fes/bin/fes.js +++ b/packages/fes/bin/fes.js @@ -5,7 +5,7 @@ const resolveCwd = require('resolve-cwd'); const { name, bin } = require('../package.json'); const localCLI = resolveCwd.silent(`${name}/${bin.fes}`); -if (!process.env.USE_GLOBAL_UMI && localCLI && localCLI !== __filename) { +if (!process.env.USE_GLOBAL_FES && localCLI && localCLI !== __filename) { // eslint-disable-next-line require(localCLI); } else { diff --git a/packages/fes/src/serviceWithBuiltIn.js b/packages/fes/src/serviceWithBuiltIn.js index 8d64fa54..e8778e0e 100644 --- a/packages/fes/src/serviceWithBuiltIn.js +++ b/packages/fes/src/serviceWithBuiltIn.js @@ -6,7 +6,6 @@ class Service extends CoreService { constructor(opts) { process.env.FES_VERSION = require('../package').version; process.env.FES_DIR = dirname(require.resolve('../package')); - process.env.UMI_DIR = dirname(require.resolve('../package')); super({ ...opts,