aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auto_source.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/auto_source.js b/auto_source.js
index 5ffb25f..ae15609 100644
--- a/auto_source.js
+++ b/auto_source.js
@@ -133,6 +133,19 @@ let INFO =
return normalize(cur.path);
}
+ function source (filepath) {
+ io.source(filepath);
+ let ctx = liberator.plugins.contexts[filepath];
+ liberator.log(filepath);
+ if (ctx) {
+ liberator.log(ctx.NAME);
+ if (typeof liberator.plugins[ctx.NAME] === 'undefined')
+ liberator.plugins[ctx.NAME] = ctx;
+ } else {
+ liberator.echoerr('plugin_loader.js: context not found (' + filepath + ')');
+ }
+ }
+
function startWatching (filepath, command, force, initHelp) {
if (exists(filepath)) {
if (force) {
@@ -153,7 +166,7 @@ let INFO =
if (last != current) {
liberator.log('sourcing: ' + filepath);
last = current;
- io.source(filepath);
+ source(filepath);
if (command) {
liberator.log('command execute: ' + command);
liberator.execute(command);