From fd61b8763337e6c29b06074dbbf7173e8aa65727 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 12 Apr 2010 17:34:16 +0000 Subject: source 時に context を考慮するようにした git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37206 d0d07461-0603-4401-acd4-de1884942a52 --- auto_source.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'auto_source.js') 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); -- cgit v1.2.3