Skip to content

Commit

Permalink
Actually allow plugins to be stored as devDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Carroll, Joseph D authored and Carroll, Joseph D committed Aug 1, 2017
1 parent 6c0fbd0 commit 4d1c74c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hexo/load_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-"
Expand Down

0 comments on commit 4d1c74c

Please sign in to comment.