From 47fb29a710bd60a2ef487065972c2b5ea6b1f80c Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Fri, 20 Jan 2017 12:05:25 +0100
Subject: [PATCH] [enh] Modules: autoStack() can now be given a priority list
 of modules to be injected

---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index b3cc4fada..04d2161cb 100644
--- a/index.js
+++ b/index.js
@@ -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));
   }
 };
 
-- 
GitLab