mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-24 13:14:16 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
4b12b442ac
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"dev-server": "nodemon server/app.js dev -L",
|
||||
"install-server": "node server/install.js",
|
||||
"dev-client": "ykit s -p 4000",
|
||||
"dev-client": "ykit watch",
|
||||
"dev": "npm run dev-server & npm run dev-client",
|
||||
"server": "node server/app.js"
|
||||
},
|
||||
|
@ -50,7 +50,8 @@ module.exports = function(){
|
||||
if(yapi.WEBCONFIG.plugins && Array.isArray(yapi.WEBCONFIG.plugins)){
|
||||
yapi.WEBCONFIG.plugins.forEach(plugin=>{
|
||||
if(!yapi.commons.fileExist(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js'))){
|
||||
throw new Error(`请安装插件(${plugin}), npm install yapi-plugin-${plugin}`)
|
||||
throw new Error(`请安装插件(${plugin}), npm install yapi-plugin-${plugin}`);
|
||||
process.exit();
|
||||
}
|
||||
let pluginModule = require(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js'));
|
||||
pluginModule.apply(yapi)
|
||||
|
Loading…
Reference in New Issue
Block a user