From 4d1c74c99902048a45a382f39c53286e9ca7fc0c Mon Sep 17 00:00:00 2001 From: "Carroll, Joseph D" Date: Tue, 1 Aug 2017 12:14:00 -0400 Subject: [PATCH] Actually allow plugins to be stored as devDependencies --- lib/hexo/load_plugins.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/hexo/load_plugins.js b/lib/hexo/load_plugins.js index 537dac4796..53deaff73a 100644 --- a/lib/hexo/load_plugins.js +++ b/lib/hexo/load_plugins.js @@ -31,9 +31,10 @@ function loadModuleList(ctx) { // Read package.json and find dependencies return fs.readFile(packagePath).then(function(content) { var json = JSON.parse(content); - var deps = json.dependencies || json.devDependencies || {}; + var deps = Object.keys(json.dependencies || {}); + var devDeps = Object.keys(json.devDependencies || {}); - return Object.keys(deps); + return deps.concat(devDeps); }); }).filter(function(name) { // Ignore plugins whose name is not started with "hexo-"