Skip to content
Snippets Groups Projects
Commit 47fb29a7 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Modules: autoStack() can now be given a priority list of modules to be injected

parent 2908f26c
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ module.exports.statics = {
/**
* Creates a new stack pre-registered with compliant modules found in package.json
*/
autoStack: () => {
autoStack: (priorityModules) => {
const pjson = require('./package.json');
const duniterModules = [];
......@@ -84,7 +84,7 @@ module.exports.statics = {
}
// The final stack
return new Stack(PRODUCTION_DEPENDENCIES.concat(duniterModules));
return new Stack((priorityModules || []).concat(PRODUCTION_DEPENDENCIES).concat(duniterModules));
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment