From 4e90de493edff60ccfea053da79fe7fb24ee437d Mon Sep 17 00:00:00 2001 From: gucovip Date: Tue, 24 Dec 2019 14:10:14 +0800 Subject: [PATCH] fix: review code --- app/loaders/PluginLoader/index.js | 4 ++-- app/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/loaders/PluginLoader/index.js b/app/loaders/PluginLoader/index.js index 1312673..5de80be 100644 --- a/app/loaders/PluginLoader/index.js +++ b/app/loaders/PluginLoader/index.js @@ -2,7 +2,7 @@ const path = require('path') module.exports = (utils) => { const baseArr = getPluginFromDir(path.join(evaSpace.ROOT_DIR, 'base_plugin')) console.trace('基础插件加载完毕.') - utils.createFolder(evaSpace.evaWorkHome + '/plugins/default') + utils.createFolder(`${evaSpace.evaWorkHome}/plugins/default`) const extendArr = getPluginFromDir(path.join(evaSpace.evaWorkHome, 'plugins')) console.trace('扩展插件加载完毕.') const allPlugin = baseArr.concat(extendArr) @@ -17,7 +17,7 @@ function getPluginFromDir(path) { return require("fs").readdirSync(path).filter(item => { return item !== '.DS_Store' }).map(file => { - const middleObject = require(`${path}/` + file) + const middleObject = require(`${path}/${file}`) return { ...middleObject, __dir: path diff --git a/app/package.json b/app/package.json index add5e83..cee20ca 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "eva-app", - "version": "0.0.1", + "version": "1.0.0", "description": "", "main": "./index.js", "scripts": {