Fully remove when.js dependency

This commit is contained in:
Nick O'Leary
2020-11-30 14:38:48 +00:00
parent beccdac717
commit 5992ed1fab
49 changed files with 299 additions and 357 deletions

View File

@@ -17,7 +17,6 @@
var fs = require("fs");
var path = require("path");
var events;
var log;
var log = require("@node-red/util").log;
@@ -29,7 +28,6 @@ var iconFileExtensions = [".png", ".gif", ".svg"];
function init(runtime) {
settings = runtime.settings;
events = runtime.events;
}
function isIncluded(name) {
@@ -75,7 +73,6 @@ function getLocalFile(file) {
/**
* Synchronously walks the directory looking for node files.
* Emits 'node-icon-dir' events for an icon dirs found
* @param dir the directory to search
* @return an array of fully-qualified paths to .js files
*/
@@ -229,7 +226,6 @@ function getModuleNodeFiles(module) {
try {
fs.statSync(examplesDir)
result.examples = {path:examplesDir};
// events.emit("node-examples-dir",{name:pkg.name,path:examplesDir});
} catch(err) {
}
return result;